home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_srgp.lha / srgp / doc / srgp.tex < prev    next >
LaTeX Document  |  1992-01-09  |  53.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Croteam texture file (image/croteamTextureFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 64 65 66 5c 6d 69 6e | 6f 72 73 65 63 74 23 31 |\def\min|orsect#1|
|00000010| 23 32 7b 5c 73 65 63 74 | 69 6f 6e 7b 5c 74 74 69 |#2{\sect|ion{\tti|
|00000020| 74 7b 23 31 7e 7e 7e 7e | 7d 23 32 7d 7d 0a 5c 64 |t{#1~~~~|}#2}}.\d|
|00000030| 65 66 5c 6d 61 6a 6f 72 | 73 65 63 74 23 31 23 32 |ef\major|sect#1#2|
|00000040| 7b 5c 73 65 63 74 69 6f | 6e 7b 5c 74 74 69 74 7b |{\sectio|n{\ttit{|
|00000050| 23 31 7e 7e 7e 7e 7d 23 | 32 7d 7d 0a 5c 64 65 66 |#1~~~~}#|2}}.\def|
|00000060| 5c 58 31 31 70 6c 61 74 | 66 6f 72 6d 7b 31 7d 0a |\X11plat|form{1}.|
|00000070| 5c 64 65 66 5c 4d 61 63 | 70 6c 61 74 66 6f 72 6d |\def\Mac|platform|
|00000080| 7b 32 7d 0a 5c 64 65 66 | 5c 69 66 58 31 31 23 31 |{2}.\def|\ifX11#1|
|00000090| 7b 5c 69 66 6e 75 6d 5c | 70 6c 61 74 66 6f 72 6d |{\ifnum\|platform|
|000000a0| 3d 5c 58 31 31 70 6c 61 | 74 66 6f 72 6d 20 23 31 |=\X11pla|tform #1|
|000000b0| 5c 66 69 7d 0a 5c 64 65 | 66 5c 69 66 4d 61 63 23 |\fi}.\de|f\ifMac#|
|000000c0| 31 7b 5c 69 66 6e 75 6d | 5c 70 6c 61 74 66 6f 72 |1{\ifnum|\platfor|
|000000d0| 6d 3d 5c 4d 61 63 70 6c | 61 74 66 6f 72 6d 20 23 |m=\Macpl|atform #|
|000000e0| 31 5c 66 69 7d 0a 5c 64 | 65 66 5c 4d 41 43 4e 4f |1\fi}.\d|ef\MACNO|
|000000f0| 48 41 56 45 7b 5c 69 66 | 4d 61 63 7b 5c 62 6f 6c |HAVE{\if|Mac{\bol|
|00000100| 64 69 74 7b 43 75 72 72 | 65 6e 74 6c 79 20 6e 6f |dit{Curr|ently no|
|00000110| 74 20 69 6d 70 6c 65 6d | 65 6e 74 65 64 20 6f 6e |t implem|ented on|
|00000120| 20 4d 61 63 20 76 65 72 | 73 69 6f 6e 21 7d 7d 7d | Mac ver|sion!}}}|
|00000130| 0a 5c 69 66 58 31 31 7b | 5c 6d 61 6b 65 74 69 74 |.\ifX11{|\maketit|
|00000140| 6c 65 7b 53 52 47 50 20 | 66 6f 72 20 41 4e 53 49 |le{SRGP |for ANSI|
|00000150| 2d 43 20 7e 7e 7e 20 28 | 76 31 2e 30 29 7d 7d 0a |-C ~~~ (|v1.0)}}.|
|00000160| 5c 69 66 4d 61 63 7b 5c | 6d 61 6b 65 74 69 74 6c |\ifMac{\|maketitl|
|00000170| 65 7b 53 52 47 50 20 66 | 6f 72 20 54 48 49 4e 4b |e{SRGP f|or THINK|
|00000180| 20 43 20 20 7e 7e 7e 20 | 20 28 76 31 2e 30 29 7d | C ~~~ | (v1.0)}|
|00000190| 7d 0a 5c 69 74 69 74 7b | 5c 63 65 6e 74 65 72 6c |}.\itit{|\centerl|
|000001a0| 69 6e 65 7b 44 61 76 69 | 64 20 46 72 65 64 65 72 |ine{Davi|d Freder|
|000001b0| 69 63 6b 20 53 6b 6c 61 | 72 7d 7d 0a 5c 6e 65 77 |ick Skla|r}}.\new|
|000001c0| 70 61 72 0a 54 68 65 20 | 53 69 6d 70 6c 65 20 52 |par.The |Simple R|
|000001d0| 61 73 74 65 72 20 47 72 | 61 70 68 69 63 73 20 50 |aster Gr|aphics P|
|000001e0| 61 63 6b 61 67 65 20 69 | 73 20 63 6f 6d 70 6f 73 |ackage i|s compos|
|000001f0| 65 64 20 6f 66 20 61 20 | 6c 69 62 72 61 72 79 20 |ed of a |library |
|00000200| 6f 66 20 66 75 6e 63 74 | 69 6f 6e 73 2c 20 0a 61 |of funct|ions, .a|
|00000210| 6e 64 20 61 0a 68 65 61 | 64 65 72 20 66 69 6c 65 |nd a.hea|der file|
|00000220| 20 28 60 60 73 72 67 70 | 2e 68 27 27 29 20 74 68 | (``srgp|.h'') th|
|00000230| 61 74 20 64 65 66 69 6e | 65 73 20 63 75 73 74 6f |at defin|es custo|
|00000240| 6d 20 64 61 74 61 20 74 | 79 70 65 73 20 61 6e 64 |m data t|ypes and|
|00000250| 20 63 6f 6e 73 74 61 6e | 74 73 2c 20 61 6e 64 0a | constan|ts, and.|
|00000260| 77 68 69 63 68 20 70 72 | 6f 74 6f 74 79 70 65 73 |which pr|ototypes|
|00000270| 20 61 6c 6c 20 53 52 47 | 50 20 72 6f 75 74 69 6e | all SRG|P routin|
|00000280| 65 73 2e 20 20 54 68 69 | 73 20 70 61 70 65 72 20 |es. Thi|s paper |
|00000290| 69 73 20 61 20 63 6f 6d | 70 6c 65 74 65 20 62 75 |is a com|plete bu|
|000002a0| 74 0a 5c 73 6c 61 6e 74 | 69 74 7b 65 78 74 72 65 |t.\slant|it{extre|
|000002b0| 6d 65 6c 79 20 74 65 72 | 73 65 7d 20 64 65 73 63 |mely ter|se} desc|
|000002c0| 72 69 70 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 41 |ription |of the A|
|000002d0| 4e 53 49 2d 43 20 53 52 | 47 50 20 62 69 6e 64 69 |NSI-C SR|GP bindi|
|000002e0| 6e 67 20 2d 2d 2d 20 74 | 68 69 73 20 69 73 0a 6e |ng --- t|his is.n|
|000002f0| 6f 74 20 61 20 74 75 74 | 6f 72 69 61 6c 2e 20 20 |ot a tut|orial. |
|00000300| 49 66 20 79 6f 75 20 61 | 72 65 20 6e 65 77 20 74 |If you a|re new t|
|00000310| 6f 20 53 52 47 50 2c 20 | 79 6f 75 20 6d 75 73 74 |o SRGP, |you must|
|00000320| 20 72 65 61 64 20 43 68 | 61 70 74 65 72 20 32 20 | read Ch|apter 2 |
|00000330| 6f 66 0a 5c 69 74 69 74 | 7b 43 6f 6d 70 75 74 65 |of.\itit|{Compute|
|00000340| 72 20 47 72 61 70 68 69 | 63 73 20 2d 2d 2d 20 50 |r Graphi|cs --- P|
|00000350| 72 69 6e 63 69 70 6c 65 | 73 20 61 6e 64 20 50 72 |rinciple|s and Pr|
|00000360| 61 63 74 69 63 65 7d 20 | 28 46 6f 6c 65 79 2c 20 |actice} |(Foley, |
|00000370| 76 61 6e 20 44 61 6d 2c | 20 46 65 69 6e 65 72 2c |van Dam,| Feiner,|
|00000380| 0a 61 6e 64 20 48 75 67 | 68 65 73 2c 20 41 64 64 |.and Hug|hes, Add|
|00000390| 69 73 6f 6e 2d 57 65 73 | 6c 65 79 2c 20 31 39 39 |ison-Wes|ley, 199|
|000003a0| 30 29 2e 0a 0a 5c 69 66 | 4d 61 63 7b 5c 6e 65 77 |0)...\if|Mac{\new|
|000003b0| 70 61 72 7d 0a 5c 69 66 | 4d 61 63 7b 49 66 20 79 |par}.\if|Mac{If y|
|000003c0| 6f 75 20 77 69 73 68 20 | 74 6f 20 75 73 65 20 74 |ou wish |to use t|
|000003d0| 68 65 20 54 48 49 4e 4b | 20 50 61 73 63 61 6c 20 |he THINK| Pascal |
|000003e0| 0a 76 65 72 73 69 6f 6e | 20 6f 66 20 53 52 47 50 |.version| of SRGP|
|000003f0| 2c 20 74 68 69 73 20 64 | 6f 63 75 6d 65 6e 74 20 |, this d|ocument |
|00000400| 69 73 20 73 74 69 6c 6c | 0a 79 6f 75 72 20 70 72 |is still|.your pr|
|00000410| 69 6d 61 72 79 20 72 65 | 73 6f 75 72 63 65 2e 20 |imary re|source. |
|00000420| 20 54 68 65 20 66 65 77 | 20 69 6d 70 6f 72 74 61 | The few| importa|
|00000430| 6e 74 20 70 6f 69 6e 74 | 73 20 79 6f 75 20 6e 65 |nt point|s you ne|
|00000440| 65 64 20 74 6f 20 6b 6e | 6f 77 20 61 72 65 20 69 |ed to kn|ow are i|
|00000450| 6e 20 74 68 65 0a 52 45 | 41 44 4d 45 20 66 69 6c |n the.RE|ADME fil|
|00000460| 65 20 64 69 73 74 72 69 | 62 75 74 65 64 20 77 69 |e distri|buted wi|
|00000470| 74 68 20 74 68 65 20 54 | 48 49 4e 4b 20 50 61 73 |th the T|HINK Pas|
|00000480| 63 61 6c 20 76 65 72 73 | 69 6f 6e 2e 7d 0a 0a 0a |cal vers|ion.}...|
|00000490| 5c 62 65 67 69 6e 63 6f | 64 65 0a 0a 5c 65 6e 64 |\beginco|de..\end|
|000004a0| 63 6f 64 65 0a 0a 5c 69 | 74 65 6d 7b 30 29 7d 20 |code..\i|tem{0)} |
|000004b0| 43 6f 6e 74 72 61 73 74 | 20 77 69 74 68 20 54 65 |Contrast| with Te|
|000004c0| 78 74 62 6f 6f 6b 20 53 | 70 65 63 69 66 69 63 61 |xtbook S|pecifica|
|000004d0| 74 69 6f 6e 0a 0a 5c 6e | 65 77 64 69 73 70 6c 61 |tion..\n|ewdispla|
|000004e0| 79 0a 0a 5c 69 74 65 6d | 7b 31 29 7d 20 53 74 61 |y..\item|{1)} Sta|
|000004f0| 74 65 73 20 6f 66 20 74 | 68 65 20 53 79 73 74 65 |tes of t|he Syste|
|00000500| 6d 0a 0a 5c 6e 65 77 64 | 69 73 70 6c 61 79 0a 0a |m..\newd|isplay..|
|00000510| 5c 69 74 65 6d 7b 32 29 | 7d 20 43 61 6e 76 61 73 |\item{2)|} Canvas|
|00000520| 65 73 0a 0a 5c 6e 65 77 | 64 69 73 70 6c 61 79 0a |es..\new|display.|
|00000530| 0a 5c 69 74 65 6d 7b 33 | 29 7d 20 4f 75 74 70 75 |.\item{3|)} Outpu|
|00000540| 74 0a 5c 69 74 65 6d 6d | 6d 7b 31 29 7d 20 63 6f |t.\itemm|m{1)} co|
|00000550| 6c 6f 72 0a 5c 69 74 65 | 6d 6d 6d 7b 32 29 7d 20 |lor.\ite|mmm{2)} |
|00000560| 67 65 6f 6d 65 74 72 69 | 63 20 64 61 74 61 20 74 |geometri|c data t|
|00000570| 79 70 65 73 0a 5c 69 74 | 65 6d 6d 6d 7b 33 29 7d |ypes.\it|emmm{3)}|
|00000580| 20 63 6f 6e 74 72 6f 6c | 20 6f 66 20 74 68 65 20 | control| of the |
|00000590| 70 61 74 74 65 72 6e 20 | 61 6e 64 20 66 6f 6e 74 |pattern |and font|
|000005a0| 20 74 61 62 6c 65 73 0a | 5c 69 74 65 6d 6d 6d 7b | tables.|\itemmm{|
|000005b0| 34 29 7d 20 63 6f 6e 74 | 72 6f 6c 20 6f 66 20 61 |4)} cont|rol of a|
|000005c0| 74 74 72 69 62 75 74 65 | 73 20 61 66 66 65 63 74 |ttribute|s affect|
|000005d0| 69 6e 67 20 6f 75 74 70 | 75 74 0a 5c 69 74 65 6d |ing outp|ut.\item|
|000005e0| 6d 6d 7b 35 29 7d 20 67 | 65 6e 65 72 61 74 69 6f |mm{5)} g|eneratio|
|000005f0| 6e 20 6f 66 20 70 72 69 | 6d 69 74 69 76 65 73 0a |n of pri|mitives.|
|00000600| 5c 69 74 65 6d 6d 6d 7b | 36 29 7d 20 67 65 6e 65 |\itemmm{|6)} gene|
|00000610| 72 61 74 69 6f 6e 20 6f | 66 20 70 72 69 6d 69 74 |ration o|f primit|
|00000620| 69 76 65 73 0a 0a 5c 6e | 65 77 64 69 73 70 6c 61 |ives..\n|ewdispla|
|00000630| 79 0a 0a 5c 69 74 65 6d | 7b 34 29 7d 20 54 68 65 |y..\item|{4)} The|
|00000640| 20 63 6f 70 79 50 69 78 | 65 6c 20 50 72 6f 63 65 | copyPix|el Proce|
|00000650| 64 75 72 65 0a 0a 5c 6e | 65 77 64 69 73 70 6c 61 |dure..\n|ewdispla|
|00000660| 79 0a 0a 5c 69 74 65 6d | 7b 35 29 7d 20 49 6e 70 |y..\item|{5)} Inp|
|00000670| 75 74 0a 5c 69 74 65 6d | 6d 6d 7b 31 29 7d 20 70 |ut.\item|mm{1)} p|
|00000680| 72 6f 70 65 72 74 69 65 | 73 20 6f 66 20 69 6e 70 |ropertie|s of inp|
|00000690| 75 74 20 64 65 76 69 63 | 65 73 0a 5c 69 74 65 6d |ut devic|es.\item|
|000006a0| 6d 6d 7b 32 29 7d 20 69 | 6e 70 75 74 20 6d 6f 64 |mm{2)} i|nput mod|
|000006b0| 65 73 0a 5c 69 74 65 6d | 6d 6d 7b 33 29 7d 20 69 |es.\item|mm{3)} i|
|000006c0| 6e 70 75 74 20 64 65 76 | 69 63 65 73 0a 5c 69 74 |nput dev|ices.\it|
|000006d0| 65 6d 6d 6d 7b 34 29 7d | 20 63 6f 6e 74 72 6f 6c |emmm{4)}| control|
|000006e0| 20 6f 66 20 61 74 74 72 | 69 62 75 74 65 73 0a 5c | of attr|ibutes.\|
|000006f0| 69 74 65 6d 6d 6d 7b 35 | 29 7d 20 63 6f 6e 74 72 |itemmm{5|)} contr|
|00000700| 6f 6c 20 6f 66 20 6d 65 | 61 73 75 72 65 73 0a 5c |ol of me|asures.\|
|00000710| 69 74 65 6d 6d 6d 7b 36 | 29 7d 20 73 61 6d 70 6c |itemmm{6|)} sampl|
|00000720| 65 20 70 72 6f 63 65 64 | 75 72 65 73 0a 5c 69 74 |e proced|ures.\it|
|00000730| 65 6d 6d 6d 7b 37 29 7d | 20 65 76 65 6e 74 20 70 |emmm{7)}| event p|
|00000740| 72 6f 63 65 64 75 72 65 | 73 0a 0a 5c 6e 65 77 64 |rocedure|s..\newd|
|00000750| 69 73 70 6c 61 79 0a 0a | 5c 69 74 65 6d 7b 36 29 |isplay..|\item{6)|
|00000760| 7d 20 49 6e 71 75 69 72 | 79 0a 0a 5c 6e 65 77 64 |} Inquir|y..\newd|
|00000770| 69 73 70 6c 61 79 0a 0a | 5c 69 74 65 6d 7b 37 29 |isplay..|\item{7)|
|00000780| 7d 20 43 6f 6e 74 72 6f | 6c 20 6f 66 20 54 61 62 |} Contro|l of Tab|
|00000790| 6c 65 20 53 69 7a 65 73 | 0a 0a 5c 6e 65 77 64 69 |le Sizes|..\newdi|
|000007a0| 73 70 6c 61 79 0a 0a 5c | 69 74 65 6d 7b 38 29 7d |splay..\|item{8)}|
|000007b0| 20 44 69 61 67 6e 6f 73 | 74 69 63 73 2c 20 44 65 | Diagnos|tics, De|
|000007c0| 62 75 67 67 69 6e 67 2c | 20 61 6e 64 20 4f 70 74 |bugging,| and Opt|
|000007d0| 69 6d 69 7a 61 74 69 6f | 6e 0a 0a 5c 6e 65 77 64 |imizatio|n..\newd|
|000007e0| 69 73 70 6c 61 79 0a 0a | 5c 69 74 65 6d 7b 39 29 |isplay..|\item{9)|
|000007f0| 7d 20 4d 69 73 63 65 6c | 6c 61 6e 65 6f 75 73 20 |} Miscel|laneous |
|00000800| 28 48 69 6e 74 73 20 61 | 6e 64 20 43 61 76 65 61 |(Hints a|nd Cavea|
|00000810| 74 73 20 61 6e 64 20 65 | 74 63 2e 29 0a 0a 25 25 |ts and e|tc.)..%%|
|00000820| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000830| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000840| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000850| 25 25 25 25 25 25 25 25 | 25 25 25 25 0a 0a 5c 6d |%%%%%%%%|%%%%..\m|
|00000860| 61 6a 6f 72 73 65 63 74 | 7b 30 7d 7b 43 6f 6e 74 |ajorsect|{0}{Cont|
|00000870| 72 61 73 74 20 77 69 74 | 68 20 54 65 78 74 62 6f |rast wit|h Textbo|
|00000880| 6f 6b 20 53 70 65 63 69 | 66 69 63 61 74 69 6f 6e |ok Speci|fication|
|00000890| 7d 0a 43 68 61 70 74 65 | 72 20 33 20 6f 66 20 74 |}.Chapte|r 3 of t|
|000008a0| 68 65 20 74 65 78 74 62 | 6f 6f 6b 20 69 73 20 61 |he textb|ook is a|
|000008b0| 6e 20 61 63 61 64 65 6d | 69 63 20 73 74 75 64 79 |n academ|ic study|
|000008c0| 20 6f 66 20 74 68 65 20 | 69 73 73 75 65 73 20 69 | of the |issues i|
|000008d0| 6e 76 6f 6c 76 65 64 20 | 69 6e 0a 69 6d 70 6c 65 |nvolved |in.imple|
|000008e0| 6d 65 6e 74 69 6e 67 20 | 61 6e 79 20 72 61 73 74 |menting |any rast|
|000008f0| 65 72 20 67 72 61 70 68 | 69 63 73 20 70 61 63 6b |er graph|ics pack|
|00000900| 61 67 65 3b 20 69 74 20 | 69 73 20 5c 69 74 69 74 |age; it |is \itit|
|00000910| 7b 6e 6f 74 7d 20 61 20 | 64 65 73 63 72 69 70 74 |{not} a |descript|
|00000920| 69 6f 6e 20 6f 66 20 74 | 68 65 0a 61 63 74 75 61 |ion of t|he.actua|
|00000930| 6c 20 69 6e 74 65 72 6e | 61 6c 20 77 6f 72 6b 69 |l intern|al worki|
|00000940| 6e 67 73 20 6f 66 20 61 | 6e 79 20 70 61 72 74 69 |ngs of a|ny parti|
|00000950| 63 75 6c 61 72 20 53 52 | 47 50 20 69 6d 70 6c 65 |cular SR|GP imple|
|00000960| 6d 65 6e 74 61 74 69 6f | 6e 2e 20 20 53 52 47 50 |mentatio|n. SRGP|
|00000970| 20 68 61 73 20 62 65 65 | 6e 0a 69 6d 70 6c 65 6d | has bee|n.implem|
|00000980| 65 6e 74 65 64 20 6f 6e | 20 73 65 76 65 72 61 6c |ented on| several|
|00000990| 20 6d 61 6a 6f 72 20 74 | 79 70 65 73 20 6f 66 20 | major t|ypes of |
|000009a0| 68 61 72 64 77 61 72 65 | 20 70 6c 61 74 66 6f 72 |hardware| platfor|
|000009b0| 6d 73 2c 20 61 6e 64 20 | 69 6e 20 61 6c 6c 20 63 |ms, and |in all c|
|000009c0| 61 73 65 73 2c 0a 6c 6f | 77 2d 6c 65 76 65 6c 20 |ases,.lo|w-level |
|000009d0| 67 72 61 70 68 69 63 73 | 20 75 74 69 6c 69 74 69 |graphics| utiliti|
|000009e0| 65 73 20 28 51 75 69 63 | 6b 44 72 61 77 20 6f 6e |es (Quic|kDraw on|
|000009f0| 20 74 68 65 20 4d 61 63 | 2c 20 58 31 31 20 6f 6e | the Mac|, X11 on|
|00000a00| 20 77 6f 72 6b 73 74 61 | 74 69 6f 6e 73 2c 20 61 | worksta|tions, a|
|00000a10| 6e 64 0a 4d 65 74 61 47 | 72 61 70 68 69 63 73 20 |nd.MetaG|raphics |
|00000a20| 6f 6e 20 74 68 65 20 50 | 43 29 20 77 65 72 65 20 |on the P|C) were |
|00000a30| 75 73 65 64 2e 20 20 42 | 65 63 61 75 73 65 20 74 |used. B|ecause t|
|00000a40| 68 65 20 61 75 74 68 6f | 72 73 20 6f 66 20 53 52 |he autho|rs of SR|
|00000a50| 47 50 20 77 65 72 65 20 | 6e 6f 74 0a 69 6e 76 6f |GP were |not.invo|
|00000a60| 6c 76 65 64 20 69 6e 20 | 74 68 65 20 69 6d 70 6c |lved in |the impl|
|00000a70| 65 6d 65 6e 74 61 74 69 | 6f 6e 20 6f 66 20 74 68 |ementati|on of th|
|00000a80| 65 20 73 6f 66 74 77 61 | 72 65 20 61 63 74 75 61 |e softwa|re actua|
|00000a90| 6c 6c 79 20 64 72 61 77 | 69 6e 67 20 74 68 65 20 |lly draw|ing the |
|00000aa0| 70 72 69 6d 69 74 69 76 | 65 73 2c 0a 74 68 65 72 |primitiv|es,.ther|
|00000ab0| 65 20 69 73 20 6e 6f 20 | 70 69 78 65 6c 2d 6c 65 |e is no |pixel-le|
|00000ac0| 76 65 6c 20 63 6f 6d 70 | 61 74 69 62 69 6c 69 74 |vel comp|atibilit|
|00000ad0| 79 20 62 65 74 77 65 65 | 6e 20 53 52 47 50 20 61 |y betwee|n SRGP a|
|00000ae0| 70 70 6c 69 63 61 74 69 | 6f 6e 73 20 72 75 6e 6e |pplicati|ons runn|
|00000af0| 69 6e 67 20 6f 6e 0a 64 | 69 66 66 65 72 65 6e 74 |ing on.d|ifferent|
|00000b00| 20 70 6c 61 74 66 6f 72 | 6d 73 2e 20 20 46 6f 72 | platfor|ms. For|
|00000b10| 74 75 6e 61 74 65 6c 79 | 2c 20 74 68 65 20 69 6e |tunately|, the in|
|00000b20| 63 6f 6e 73 69 73 74 65 | 6e 63 79 20 69 6e 20 61 |consiste|ncy in a|
|00000b30| 70 70 65 61 72 61 6e 63 | 65 20 77 69 6c 6c 20 62 |ppearanc|e will b|
|00000b40| 65 0a 74 79 70 69 63 61 | 6c 6c 79 20 6e 6f 74 69 |e.typica|lly noti|
|00000b50| 63 65 61 62 6c 65 20 6f | 6e 6c 79 20 66 6f 72 20 |ceable o|nly for |
|00000b60| 65 78 74 72 65 6d 65 20 | 76 61 6c 75 65 73 20 66 |extreme |values f|
|00000b70| 6f 72 20 61 74 74 72 69 | 62 75 74 65 73 20 28 76 |or attri|butes (v|
|00000b80| 65 72 79 20 74 68 69 63 | 6b 0a 70 72 69 6d 69 74 |ery thic|k.primit|
|00000b90| 69 76 65 73 2c 20 72 61 | 72 65 20 63 6f 6d 62 69 |ives, ra|re combi|
|00000ba0| 6e 61 74 69 6f 6e 73 20 | 6f 66 20 77 72 69 74 65 |nations |of write|
|00000bb0| 20 6d 6f 64 65 20 61 6e | 64 20 70 65 6e 2f 66 69 | mode an|d pen/fi|
|00000bc0| 6c 6c 20 73 74 79 6c 65 | 2c 20 65 74 63 2e 29 2e |ll style|, etc.).|
|00000bd0| 0a 0a 5c 6e 65 77 70 61 | 72 0a 54 68 65 20 74 65 |..\newpa|r.The te|
|00000be0| 78 74 62 6f 6f 6b 20 73 | 70 65 63 20 64 69 64 20 |xtbook s|pec did |
|00000bf0| 6e 6f 74 20 64 69 73 63 | 75 73 73 20 68 6f 77 20 |not disc|uss how |
|00000c00| 53 52 47 50 20 77 6f 75 | 6c 64 20 77 6f 72 6b 20 |SRGP wou|ld work |
|00000c10| 69 6e 20 61 20 77 69 6e | 64 6f 77 69 6e 67 0a 65 |in a win|dowing.e|
|00000c20| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2e 20 20 54 68 69 |nvironme|nt. Thi|
|00000c30| 73 20 64 6f 63 75 6d 65 | 6e 74 20 64 65 73 63 72 |s docume|nt descr|
|00000c40| 69 62 65 73 20 68 6f 77 | 20 74 68 65 20 77 69 6e |ibes how| the win|
|00000c50| 64 6f 77 69 6e 67 20 65 | 6e 76 69 72 6f 6e 6d 65 |dowing e|nvironme|
|00000c60| 6e 74 20 61 66 66 65 63 | 74 73 0a 53 52 47 50 2c |nt affec|ts.SRGP,|
|00000c70| 20 61 6e 64 20 69 6e 74 | 72 6f 64 75 63 65 73 20 | and int|roduces |
|00000c80| 61 20 66 65 77 20 6e 65 | 77 20 72 6f 75 74 69 6e |a few ne|w routin|
|00000c90| 65 73 20 61 64 64 72 65 | 73 73 69 6e 67 20 77 69 |es addre|ssing wi|
|00000ca0| 6e 64 6f 77 2d 73 70 65 | 63 69 66 69 63 20 70 72 |ndow-spe|cific pr|
|00000cb0| 6f 62 6c 65 6d 73 2e 0a | 0a 5c 6e 65 77 70 61 72 |oblems..|.\newpar|
|00000cc0| 0a 54 68 65 20 74 65 78 | 74 62 6f 6f 6b 27 73 20 |.The tex|tbook's |
|00000cd0| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 6f 66 20 6c |descript|ion of l|
|00000ce0| 6f 63 61 74 6f 72 20 65 | 63 68 6f 20 69 6e 63 6c |ocator e|cho incl|
|00000cf0| 75 64 65 64 20 60 60 6e | 6f 20 65 63 68 6f 27 27 |uded ``n|o echo''|
|00000d00| 20 61 73 20 61 6e 20 6f | 70 74 69 6f 6e 0a 61 76 | as an o|ption.av|
|00000d10| 61 69 6c 61 62 6c 65 20 | 74 6f 20 74 68 65 20 61 |ailable |to the a|
|00000d20| 70 70 6c 69 63 61 74 69 | 6f 6e 2e 20 20 48 6f 77 |pplicati|on. How|
|00000d30| 65 76 65 72 2c 20 69 74 | 20 77 61 73 20 64 65 74 |ever, it| was det|
|00000d40| 65 72 6d 69 6e 65 64 20 | 74 68 61 74 20 61 6e 20 |ermined |that an |
|00000d50| 69 6e 76 69 73 69 62 6c | 65 0a 63 75 72 73 6f 72 |invisibl|e.cursor|
|00000d60| 20 69 73 20 66 72 75 73 | 74 72 61 74 69 6e 67 20 | is frus|trating |
|00000d70| 74 6f 20 75 73 65 72 73 | 20 6f 66 20 61 20 6d 75 |to users| of a mu|
|00000d80| 6c 74 69 2d 77 69 6e 64 | 6f 77 20 73 79 73 74 65 |lti-wind|ow syste|
|00000d90| 6d 2e 0a 54 68 65 20 60 | 60 6e 6f 20 65 63 68 6f |m..The `|`no echo|
|00000da0| 27 27 20 6f 70 74 69 6f | 6e 20 69 73 20 74 68 75 |'' optio|n is thu|
|00000db0| 73 20 68 6f 6e 6f 72 65 | 64 20 6f 6e 6c 79 20 62 |s honore|d only b|
|00000dc0| 79 20 74 68 65 20 50 43 | 20 76 65 72 73 69 6f 6e |y the PC| version|
|00000dd0| 20 6f 66 20 53 52 47 50 | 2e 0a 0a 5c 69 66 4d 61 | of SRGP|...\ifMa|
|00000de0| 63 7b 5c 6e 65 77 70 61 | 72 20 54 68 65 20 4d 61 |c{\newpa|r The Ma|
|00000df0| 63 20 76 65 72 73 69 6f | 6e 20 63 75 72 72 65 6e |c versio|n curren|
|00000e00| 74 6c 79 20 64 6f 65 73 | 20 4e 4f 54 20 73 75 70 |tly does| NOT sup|
|00000e10| 70 6f 72 74 3a 7d 0a 5c | 69 66 4d 61 63 7b 5c 62 |port:}.\|ifMac{\b|
|00000e20| 75 6c 6c 69 74 65 6d 20 | 70 69 78 6d 61 70 20 70 |ullitem |pixmap p|
|00000e30| 61 74 74 65 72 6e 73 7d | 0a 5c 69 66 4d 61 63 7b |atterns}|.\ifMac{|
|00000e40| 5c 62 75 6c 6c 69 74 65 | 6d 20 6e 6f 6e 2d 63 6f |\bullite|m non-co|
|00000e50| 6e 74 69 6e 75 6f 75 73 | 20 6c 69 6e 65 20 73 74 |ntinuous| line st|
|00000e60| 79 6c 65 73 20 66 6f 72 | 20 65 6c 6c 69 70 73 65 |yles for| ellipse|
|00000e70| 73 20 61 6e 64 20 61 72 | 63 73 7d 0a 5c 69 66 4d |s and ar|cs}.\ifM|
|00000e80| 61 63 7b 5c 62 75 6c 6c | 69 74 65 6d 20 72 65 66 |ac{\bull|item ref|
|00000e90| 72 65 73 68 69 6e 67 20 | 6f 66 20 74 68 65 20 73 |reshing |of the s|
|00000ea0| 63 72 65 65 6e 2d 63 61 | 6e 76 61 73 20 77 69 6e |creen-ca|nvas win|
|00000eb0| 64 6f 77 20 77 68 65 6e | 20 69 74 20 69 73 20 75 |dow when| it is u|
|00000ec0| 6e 63 6f 76 65 72 65 64 | 0a 61 66 74 65 72 20 62 |ncovered|.after b|
|00000ed0| 65 69 6e 67 20 70 61 72 | 74 6c 79 20 6f 72 20 66 |eing par|tly or f|
|00000ee0| 75 6c 6c 79 20 68 69 64 | 64 65 6e 7d 0a 0a 5c 69 |ully hid|den}..\i|
|00000ef0| 66 4d 61 63 7b 5c 6e 65 | 77 70 61 72 0a 42 65 63 |fMac{\ne|wpar.Bec|
|00000f00| 61 75 73 65 20 74 68 65 | 20 64 65 73 69 67 6e 20 |ause the| design |
|00000f10| 6f 66 20 43 6f 6c 6f 72 | 20 51 75 69 63 6b 44 72 |of Color| QuickDr|
|00000f20| 61 77 20 72 65 70 72 65 | 73 65 6e 74 73 20 61 20 |aw repre|sents a |
|00000f30| 73 68 61 72 70 20 74 75 | 72 6e 20 61 77 61 79 20 |sharp tu|rn away |
|00000f40| 66 72 6f 6d 20 74 68 65 | 0a 74 72 61 64 69 74 69 |from the|.traditi|
|00000f50| 6f 6e 61 6c 20 60 60 68 | 61 6e 64 73 2d 6f 6e 2d |onal ``h|ands-on-|
|00000f60| 74 68 65 2d 68 61 72 64 | 77 61 72 65 27 27 20 61 |the-hard|ware'' a|
|00000f70| 70 70 72 6f 61 63 68 20 | 6f 66 20 72 61 73 74 65 |pproach |of raste|
|00000f80| 72 20 67 72 61 70 68 69 | 63 73 2c 20 74 68 65 20 |r graphi|cs, the |
|00000f90| 4d 61 63 0a 76 65 72 73 | 69 6f 6e 20 73 69 6d 70 |Mac.vers|ion simp|
|00000fa0| 6c 79 20 63 61 6e 6e 6f | 74 20 73 75 70 70 6f 72 |ly canno|t suppor|
|00000fb0| 74 20 61 20 67 72 65 61 | 74 20 64 65 61 6c 20 6f |t a grea|t deal o|
|00000fc0| 66 20 53 52 47 50 27 73 | 20 66 75 6e 63 74 69 6f |f SRGP's| functio|
|00000fd0| 6e 61 6c 69 74 79 2e 20 | 20 49 6e 20 0a 70 61 72 |nality. | In .par|
|00000fe0| 74 69 63 75 6c 61 72 2c | 20 74 68 65 20 76 61 72 |ticular,| the var|
|00000ff0| 69 6f 75 73 20 6e 6f 6e | 2d 74 72 69 76 69 61 6c |ious non|-trivial|
|00001000| 20 77 72 69 74 65 20 6d | 6f 64 65 73 20 28 6c 69 | write m|odes (li|
|00001010| 6b 65 20 58 4f 52 20 61 | 6e 64 20 4f 52 29 0a 61 |ke XOR a|nd OR).a|
|00001020| 72 65 20 73 75 70 70 6f | 72 74 65 64 20 62 75 74 |re suppo|rted but|
|00001030| 20 64 6f 20 6e 6f 74 0a | 61 63 74 20 70 72 65 63 | do not.|act prec|
|00001040| 69 73 65 6c 79 20 61 73 | 20 64 6f 63 75 6d 65 6e |isely as| documen|
|00001050| 74 65 64 2e 20 20 54 68 | 65 79 20 77 69 6c 6c 20 |ted. Th|ey will |
|00001060| 73 75 72 70 72 69 73 65 | 20 77 69 74 68 20 75 6e |surprise| with un|
|00001070| 70 72 65 64 69 63 74 61 | 62 6c 65 20 72 65 73 75 |predicta|ble resu|
|00001080| 6c 74 73 0a 61 6e 79 74 | 69 6d 65 20 79 6f 75 20 |lts.anyt|ime you |
|00001090| 75 73 65 20 74 68 65 6d | 20 77 68 65 6e 3a 0a 61 |use them| when:.a|
|000010a0| 29 20 79 6f 75 27 76 65 | 20 63 68 61 6e 67 65 64 |) you've| changed|
|000010b0| 20 65 6e 74 72 69 65 73 | 20 30 20 61 6e 64 20 31 | entries| 0 and 1|
|000010c0| 20 6f 66 20 74 68 65 20 | 63 6f 6c 6f 72 20 74 61 | of the |color ta|
|000010d0| 62 6c 65 20 66 72 6f 6d | 20 74 68 65 69 72 20 64 |ble from| their d|
|000010e0| 65 66 61 75 6c 74 20 76 | 61 6c 75 65 73 0a 6f 66 |efault v|alues.of|
|000010f0| 20 77 68 69 74 65 20 61 | 6e 64 20 62 6c 61 63 6b | white a|nd black|
|00001100| 2c 20 61 6e 64 2f 6f 72 | 20 62 29 20 79 6f 75 72 |, and/or| b) your|
|00001110| 20 66 6f 72 65 67 72 6f | 75 6e 64 2f 62 61 63 6b | foregro|und/back|
|00001120| 67 72 6f 75 6e 64 20 63 | 6f 6c 6f 72 73 20 61 72 |ground c|olors ar|
|00001130| 65 20 6e 6f 74 0a 63 75 | 72 72 65 6e 74 6c 79 20 |e not.cu|rrently |
|00001140| 31 2f 30 2e 20 20 0a 54 | 68 65 20 6d 6f 73 74 20 |1/0. .T|he most |
|00001150| 70 6f 70 75 6c 61 72 20 | 75 73 65 20 6f 66 20 58 |popular |use of X|
|00001160| 4f 52 27 69 6e 67 20 2d | 2d 2d 20 70 72 6f 76 69 |OR'ing -|-- provi|
|00001170| 64 69 6e 67 20 61 20 72 | 65 76 65 72 73 69 62 6c |ding a r|eversibl|
|00001180| 65 20 6d 65 74 68 6f 64 | 20 6f 66 20 0a 68 69 67 |e method| of .hig|
|00001190| 68 6c 69 67 68 74 69 6e | 67 20 2d 2d 20 64 6f 65 |hlightin|g -- doe|
|000011a0| 73 20 77 6f 72 6b 20 69 | 66 20 79 6f 75 20 66 6f |s work i|f you fo|
|000011b0| 6c 6c 6f 77 20 74 68 65 | 20 61 62 6f 76 65 20 74 |llow the| above t|
|000011c0| 77 6f 20 72 75 6c 65 73 | 20 41 4e 44 20 79 6f 75 |wo rules| AND you|
|000011d0| 20 6e 65 76 65 72 0a 63 | 68 61 6e 67 65 20 74 68 | never.c|hange th|
|000011e0| 65 20 6c 61 73 74 20 74 | 77 6f 20 65 6e 74 72 69 |e last t|wo entri|
|000011f0| 65 73 20 28 65 2e 67 2e | 2c 20 65 6e 74 72 69 65 |es (e.g.|, entrie|
|00001200| 73 20 32 35 35 20 61 6e | 64 20 32 35 34 20 6f 6e |s 255 an|d 254 on|
|00001210| 20 61 6e 20 38 2d 62 69 | 74 2d 64 65 65 70 0a 6d | an 8-bi|t-deep.m|
|00001220| 61 63 68 69 6e 65 29 20 | 6f 66 20 74 68 65 20 68 |achine) |of the h|
|00001230| 61 72 64 77 61 72 65 20 | 0a 63 6f 6c 6f 72 20 74 |ardware |.color t|
|00001240| 61 62 6c 65 2e 20 20 41 | 6c 73 6f 2c 20 62 65 20 |able. A|lso, be |
|00001250| 61 77 61 72 65 20 74 68 | 61 74 20 77 72 69 74 65 |aware th|at write|
|00001260| 20 6d 6f 64 65 73 20 6f | 74 68 65 72 20 74 68 61 | modes o|ther tha|
|00001270| 6e 20 52 45 50 4c 41 43 | 45 20 77 69 6c 6c 20 6e |n REPLAC|E will n|
|00001280| 6f 74 0a 6d 61 6b 65 20 | 73 65 6e 73 65 20 77 68 |ot.make |sense wh|
|00001290| 65 6e 20 64 72 61 77 69 | 6e 67 20 77 69 74 68 20 |en drawi|ng with |
|000012a0| 70 69 78 6d 61 70 20 70 | 61 74 74 65 72 6e 73 2e |pixmap p|atterns.|
|000012b0| 7d 0a 0a 0a 5c 69 66 58 | 31 31 7b 5c 6e 65 77 70 |}...\ifX|11{\newp|
|000012c0| 61 72 0a 54 68 65 20 74 | 65 78 74 62 6f 6f 6b 20 |ar.The t|extbook |
|000012d0| 28 70 61 67 65 20 33 33 | 29 20 63 6c 61 69 6d 73 |(page 33|) claims|
|000012e0| 20 74 68 61 74 20 74 68 | 65 20 63 6f 6c 6f 72 73 | that th|e colors|
|000012f0| 20 62 6c 61 63 6b 20 61 | 6e 64 20 77 68 69 74 65 | black a|nd white|
|00001300| 20 61 72 65 20 31 20 61 | 6e 64 20 30 2c 0a 72 65 | are 1 a|nd 0,.re|
|00001310| 73 70 65 63 74 69 76 65 | 6c 79 2c 20 61 74 20 61 |spective|ly, at a|
|00001320| 6c 6c 20 74 69 6d 65 73 | 2e 20 20 54 68 69 73 20 |ll times|. This |
|00001330| 69 73 20 74 72 75 65 20 | 66 6f 72 20 61 6c 6c 20 |is true |for all |
|00001340| 64 65 76 69 63 65 73 20 | 68 61 76 69 6e 67 20 63 |devices |having c|
|00001350| 6f 6c 6f 72 20 74 61 62 | 6c 65 73 2c 0a 62 75 74 |olor tab|les,.but|
|00001360| 20 69 74 20 69 73 20 73 | 6f 6d 65 74 69 6d 65 73 | it is s|ometimes|
|00001370| 20 66 61 6c 73 65 20 66 | 6f 72 20 6d 6f 6e 6f 63 | false f|or monoc|
|00001380| 68 72 6f 6d 65 20 73 79 | 73 74 65 6d 73 20 74 68 |hrome sy|stems th|
|00001390| 61 74 20 61 72 65 20 64 | 65 73 69 67 6e 65 64 20 |at are d|esigned |
|000013a0| 66 6f 72 0a 77 68 69 74 | 65 2d 6f 6e 2d 62 6c 61 |for.whit|e-on-bla|
|000013b0| 63 6b 20 64 69 73 70 6c | 61 79 2e 7d 0a 0a 5c 6e |ck displ|ay.}..\n|
|000013c0| 65 77 70 61 72 0a 54 68 | 65 20 74 65 78 74 62 6f |ewpar.Th|e textbo|
|000013d0| 6f 6b 20 64 69 64 20 6e | 6f 74 20 64 65 73 63 72 |ok did n|ot descr|
|000013e0| 69 62 65 20 6d 65 74 68 | 6f 64 73 20 66 6f 72 20 |ibe meth|ods for |
|000013f0| 6c 6f 61 64 69 6e 67 20 | 62 69 74 6d 61 70 20 61 |loading |bitmap a|
|00001400| 6e 64 20 70 69 78 6d 61 | 70 20 70 61 74 74 65 72 |nd pixma|p patter|
|00001410| 6e 73 0a 69 6e 74 6f 20 | 74 68 65 20 72 65 73 70 |ns.into |the resp|
|00001420| 65 63 74 69 76 65 20 70 | 61 74 74 65 72 6e 20 74 |ective p|attern t|
|00001430| 61 62 6c 65 73 2c 20 66 | 6f 72 20 6c 6f 61 64 69 |ables, f|or loadi|
|00001440| 6e 67 20 66 6f 6e 74 73 | 20 69 6e 74 6f 20 74 68 |ng fonts| into th|
|00001450| 65 20 66 6f 6e 74 20 74 | 61 62 6c 65 2c 20 61 6e |e font t|able, an|
|00001460| 64 0a 66 6f 72 20 6c 6f | 61 64 69 6e 67 20 65 6e |d.for lo|ading en|
|00001470| 74 72 69 65 73 20 69 6e | 20 74 68 65 20 63 6f 6c |tries in| the col|
|00001480| 6f 72 20 74 61 62 6c 65 | 2e 20 20 53 65 65 20 73 |or table|. See s|
|00001490| 65 63 74 69 6f 6e 73 20 | 33 2e 31 20 61 6e 64 20 |ections |3.1 and |
|000014a0| 33 2e 33 20 6f 66 20 74 | 68 69 73 0a 64 6f 63 75 |3.3 of t|his.docu|
|000014b0| 6d 65 6e 74 2e 0a 0a 5c | 6e 65 77 70 61 72 0a 54 |ment...\|newpar.T|
|000014c0| 68 65 72 65 20 61 72 65 | 20 6e 6f 77 20 60 60 64 |here are| now ``d|
|000014d0| 65 6c 75 78 65 27 27 20 | 76 65 72 73 69 6f 6e 73 |eluxe'' |versions|
|000014e0| 20 6f 66 20 74 68 65 20 | 6d 65 61 73 75 72 65 20 | of the |measure |
|000014f0| 72 65 63 6f 72 64 73 20 | 66 6f 72 20 65 61 63 68 |records |for each|
|00001500| 20 69 6e 70 75 74 20 64 | 65 76 69 63 65 2e 0a 54 | input d|evice..T|
|00001510| 68 65 73 65 20 73 68 6f | 75 6c 64 20 62 65 20 75 |hese sho|uld be u|
|00001520| 73 65 64 20 77 68 65 6e | 20 74 69 6d 65 73 74 61 |sed when| timesta|
|00001530| 6d 70 73 20 61 6e 64 20 | 6d 6f 64 69 66 69 65 72 |mps and |modifier|
|00001540| 2d 6b 65 79 20 63 68 6f | 72 64 73 20 61 72 65 20 |-key cho|rds are |
|00001550| 6e 65 65 64 65 64 2e 0a | 0a 5c 6e 65 77 70 61 72 |needed..|.\newpar|
|00001560| 0a 54 68 65 20 74 65 78 | 74 62 6f 6f 6b 20 73 70 |.The tex|tbook sp|
|00001570| 65 63 69 66 69 65 73 20 | 74 68 65 20 73 69 7a 65 |ecifies |the size|
|00001580| 20 6f 66 20 74 68 65 20 | 73 63 72 65 65 6e 20 63 | of the |screen c|
|00001590| 61 6e 76 61 73 20 63 61 | 6e 6e 6f 74 20 62 65 20 |anvas ca|nnot be |
|000015a0| 63 68 61 6e 67 65 64 20 | 62 79 0a 74 68 65 20 61 |changed |by.the a|
|000015b0| 70 70 6c 69 63 61 74 69 | 6f 6e 2e 20 20 54 68 61 |pplicati|on. Tha|
|000015c0| 74 20 69 73 20 6e 6f 20 | 6c 6f 6e 67 65 72 20 74 |t is no |longer t|
|000015d0| 68 65 20 63 61 73 65 2e | 0a 0a 0a 5c 6d 61 6a 6f |he case.|...\majo|
|000015e0| 72 73 65 63 74 7b 31 7d | 7b 53 74 61 74 65 73 20 |rsect{1}|{States |
|000015f0| 6f 66 20 74 68 65 20 53 | 79 73 74 65 6d 7d 0a 53 |of the S|ystem}.S|
|00001600| 52 47 50 20 6d 75 73 74 | 20 62 65 20 65 6e 61 62 |RGP must| be enab|
|00001610| 6c 65 64 20 62 65 66 6f | 72 65 20 75 73 65 2c 20 |led befo|re use, |
|00001620| 61 6e 64 20 64 69 73 61 | 62 6c 65 64 20 61 66 74 |and disa|bled aft|
|00001630| 65 72 20 75 73 65 2e 0a | 0a 5c 6e 65 77 73 79 6e |er use..|.\newsyn|
|00001640| 6f 70 73 69 73 0a 76 6f | 69 64 20 53 52 47 50 5f |opsis.vo|id SRGP_|
|00001650| 62 65 67 69 6e 20 28 63 | 68 61 72 20 2a 6e 61 6d |begin (c|har *nam|
|00001660| 65 2c 20 69 6e 74 20 77 | 69 64 74 68 2c 20 69 6e |e, int w|idth, in|
|00001670| 74 20 68 65 69 67 68 74 | 2c 20 69 6e 74 20 70 6c |t height|, int pl|
|00001680| 61 6e 65 73 2c 20 0a 20 | 20 20 20 20 20 20 20 20 |anes, . | |
|00001690| 20 20 20 20 20 20 20 20 | 62 6f 6f 6c 65 61 6e 20 | |boolean |
|000016a0| 65 6e 61 62 6c 65 5f 74 | 72 61 63 65 29 3b 0a 5c |enable_t|race);.\|
|000016b0| 65 6e 64 73 79 6e 6f 70 | 73 69 73 0a 54 68 65 20 |endsynop|sis.The |
|000016c0| 77 69 6e 64 6f 77 20 77 | 68 69 63 68 20 77 69 6c |window w|hich wil|
|000016d0| 6c 20 72 65 70 72 65 73 | 65 6e 74 20 63 61 6e 76 |l repres|ent canv|
|000016e0| 61 73 20 5c 23 30 20 28 | 74 68 65 20 53 52 47 50 |as \#0 (|the SRGP|
|000016f0| 20 73 63 72 65 65 6e 2d | 63 61 6e 76 61 73 29 20 | screen-|canvas) |
|00001700| 69 73 0a 63 72 65 61 74 | 65 64 3b 20 69 74 73 20 |is.creat|ed; its |
|00001710| 69 6e 69 74 69 61 6c 20 | 73 69 7a 65 20 69 73 20 |initial |size is |
|00001720| 64 65 74 65 72 6d 69 6e | 65 64 20 62 79 20 74 68 |determin|ed by th|
|00001730| 65 20 76 61 6c 75 65 73 | 20 6f 66 20 74 68 65 20 |e values| of the |
|00001740| 73 65 63 6f 6e 64 20 61 | 6e 64 20 74 68 69 72 64 |second a|nd third|
|00001750| 0a 70 61 72 61 6d 65 74 | 65 72 73 2e 20 20 54 68 |.paramet|ers. Th|
|00001760| 65 20 66 69 72 73 74 20 | 70 61 72 61 6d 65 74 65 |e first |paramete|
|00001770| 72 20 73 70 65 63 69 66 | 69 65 73 20 61 20 6e 61 |r specif|ies a na|
|00001780| 6d 65 20 66 6f 72 20 74 | 68 65 20 61 70 70 6c 69 |me for t|he appli|
|00001790| 63 61 74 69 6f 6e 2e 20 | 20 54 68 65 0a 66 69 66 |cation. | The.fif|
|000017a0| 74 68 20 70 61 72 61 6d | 65 74 65 72 20 73 70 65 |th param|eter spe|
|000017b0| 63 69 66 69 65 73 20 74 | 68 65 20 69 6e 69 74 69 |cifies t|he initi|
|000017c0| 61 6c 20 73 74 61 74 75 | 73 20 6f 66 20 74 68 65 |al statu|s of the|
|000017d0| 20 74 72 61 63 69 6e 67 | 20 66 65 61 74 75 72 65 | tracing| feature|
|000017e0| 2c 20 77 68 69 63 68 20 | 69 73 0a 64 65 73 63 72 |, which |is.descr|
|000017f0| 69 62 65 64 20 6c 61 74 | 65 72 20 69 6e 20 74 68 |ibed lat|er in th|
|00001800| 69 73 20 73 65 63 74 69 | 6f 6e 2e 0a 0a 5c 69 6e |is secti|on...\in|
|00001810| 64 65 6e 74 70 61 72 20 | 0a 54 68 65 20 66 6f 75 |dentpar |.The fou|
|00001820| 72 74 68 20 70 61 72 61 | 6d 65 74 65 72 20 69 73 |rth para|meter is|
|00001830| 20 6d 65 61 6e 69 6e 67 | 66 75 6c 20 6f 6e 6c 79 | meaning|ful only|
|00001840| 20 6f 6e 20 61 20 64 69 | 73 70 6c 61 79 20 73 75 | on a di|splay su|
|00001850| 70 70 6f 72 74 69 6e 67 | 20 63 6f 6c 6f 72 2e 20 |pporting| color. |
|00001860| 20 49 74 0a 73 70 65 63 | 69 66 69 65 73 20 68 6f | It.spec|ifies ho|
|00001870| 77 20 6d 61 6e 79 20 70 | 6c 61 6e 65 73 20 6f 66 |w many p|lanes of|
|00001880| 20 74 68 65 20 63 6f 6c | 6f 72 20 74 61 62 6c 65 | the col|or table|
|00001890| 20 73 68 6f 75 6c 64 20 | 62 65 20 72 65 73 65 72 | should |be reser|
|000018a0| 76 65 64 20 66 6f 72 20 | 53 52 47 50 27 73 20 75 |ved for |SRGP's u|
|000018b0| 73 65 3b 0a 69 2e 65 2e | 2c 20 69 74 20 70 6c 61 |se;.i.e.|, it pla|
|000018c0| 63 65 73 20 61 6e 20 75 | 70 70 65 72 20 62 6f 75 |ces an u|pper bou|
|000018d0| 6e 64 20 6f 6e 20 74 68 | 65 20 6e 75 6d 62 65 72 |nd on th|e number|
|000018e0| 20 6f 66 20 63 6f 6c 6f | 72 73 20 74 68 61 74 20 | of colo|rs that |
|000018f0| 6d 61 79 20 62 65 20 64 | 69 73 70 6c 61 79 65 64 |may be d|isplayed|
|00001900| 0a 73 69 6d 75 6c 74 61 | 6e 65 6f 75 73 6c 79 20 |.simulta|neously |
|00001910| 69 6e 20 74 68 65 20 53 | 52 47 50 20 77 69 6e 64 |in the S|RGP wind|
|00001920| 6f 77 2e 20 20 28 54 68 | 65 20 75 70 70 65 72 20 |ow. (Th|e upper |
|00001930| 62 6f 75 6e 64 20 69 73 | 20 24 32 5e 70 24 20 63 |bound is| $2^p$ c|
|00001940| 6f 6c 6f 72 73 2c 20 77 | 68 65 72 65 20 24 70 24 |olors, w|here $p$|
|00001950| 0a 69 73 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |.is the |number o|
|00001960| 66 20 70 6c 61 6e 65 73 | 2e 29 20 20 54 68 65 20 |f planes|.) The |
|00001970| 66 6f 75 72 74 68 20 70 | 61 72 61 6d 65 74 65 72 |fourth p|arameter|
|00001980| 20 69 73 20 69 67 6e 6f | 72 65 64 20 77 68 65 6e | is igno|red when|
|00001990| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 69 73 0a | the pro|gram is.|
|000019a0| 72 75 6e 20 6f 6e 20 61 | 20 62 69 6c 65 76 65 6c |run on a| bilevel|
|000019b0| 20 64 69 73 70 6c 61 79 | 2e 0a 0a 5c 69 6e 64 65 | display|...\inde|
|000019c0| 6e 74 70 61 72 0a 49 66 | 20 74 68 65 20 70 72 6f |ntpar.If| the pro|
|000019d0| 67 72 61 6d 20 69 73 20 | 62 65 69 6e 67 20 72 75 |gram is |being ru|
|000019e0| 6e 20 6f 6e 20 61 20 63 | 6f 6c 6f 72 20 64 69 73 |n on a c|olor dis|
|000019f0| 70 6c 61 79 2c 20 61 6e | 64 20 79 6f 75 20 73 65 |play, an|d you se|
|00001a00| 6e 64 20 74 68 65 20 73 | 70 65 63 69 61 6c 20 76 |nd the s|pecial v|
|00001a10| 61 6c 75 65 0a 60 60 30 | 27 27 20 61 73 20 74 68 |alue.``0|'' as th|
|00001a20| 65 20 66 6f 75 72 74 68 | 20 70 61 72 61 6d 65 74 |e fourth| paramet|
|00001a30| 65 72 2c 20 53 52 47 50 | 20 77 69 6c 6c 20 74 61 |er, SRGP| will ta|
|00001a40| 6b 65 20 6f 76 65 72 20 | 74 68 65 20 65 6e 74 69 |ke over |the enti|
|00001a50| 72 65 20 63 6f 6c 6f 72 | 20 74 61 62 6c 65 2c 0a |re color| table,.|
|00001a60| 67 69 76 69 6e 67 20 79 | 6f 75 72 20 61 70 70 6c |giving y|our appl|
|00001a70| 69 63 61 74 69 6f 6e 20 | 63 6f 6c 6f 72 20 73 75 |ication |color su|
|00001a80| 70 70 6f 72 74 20 61 73 | 20 72 69 63 68 20 61 73 |pport as| rich as|
|00001a90| 20 74 68 65 20 68 61 72 | 64 77 61 72 65 20 63 61 | the har|dware ca|
|00001aa0| 6e 20 6f 66 66 65 72 2e | 0a 28 41 66 74 65 72 20 |n offer.|.(After |
|00001ab0| 69 6e 69 74 69 61 6c 69 | 7a 69 6e 67 20 53 52 47 |initiali|zing SRG|
|00001ac0| 50 2c 20 79 6f 75 20 63 | 61 6e 20 69 6e 71 75 69 |P, you c|an inqui|
|00001ad0| 72 65 20 74 68 65 20 60 | 60 63 61 6e 76 61 73 20 |re the `|`canvas |
|00001ae0| 64 65 70 74 68 27 27 20 | 74 6f 20 64 65 74 65 72 |depth'' |to deter|
|00001af0| 6d 69 6e 65 20 68 6f 77 | 0a 6d 61 6e 79 20 70 6c |mine how|.many pl|
|00001b00| 61 6e 65 73 20 61 72 65 | 20 61 76 61 69 6c 61 62 |anes are| availab|
|00001b10| 6c 65 2e 29 20 20 54 68 | 65 20 64 69 73 61 64 76 |le.) Th|e disadv|
|00001b20| 61 6e 74 61 67 65 3a 20 | 69 74 20 77 69 6c 6c 20 |antage: |it will |
|00001b30| 62 65 20 69 6d 70 6f 73 | 73 69 62 6c 65 20 66 6f |be impos|sible fo|
|00001b40| 72 20 74 68 65 0a 75 73 | 65 72 20 74 6f 20 73 69 |r the.us|er to si|
|00001b50| 6d 75 6c 74 61 6e 65 6f | 75 73 6c 79 20 73 65 65 |multaneo|usly see|
|00001b60| 20 74 68 65 20 53 52 47 | 50 20 77 69 6e 64 6f 77 | the SRG|P window|
|00001b70| 27 73 20 70 72 6f 70 65 | 72 20 63 6f 6c 6f 72 69 |'s prope|r colori|
|00001b80| 6e 67 20 61 6e 64 20 74 | 68 65 20 6f 74 68 65 72 |ng and t|he other|
|00001b90| 0a 63 6c 69 65 6e 74 73 | 27 20 77 69 6e 64 6f 77 |.clients|' window|
|00001ba0| 73 27 20 70 72 6f 70 65 | 72 20 63 6f 6c 6f 72 69 |s' prope|r colori|
|00001bb0| 6e 67 2e 20 20 54 68 75 | 73 2c 20 79 6f 75 20 73 |ng. Thu|s, you s|
|00001bc0| 68 6f 75 6c 64 20 72 65 | 71 75 65 73 74 20 60 60 |hould re|quest ``|
|00001bd0| 30 27 27 20 70 6c 61 6e | 65 73 20 6f 6e 6c 79 0a |0'' plan|es only.|
|00001be0| 77 68 65 6e 20 79 6f 75 | 72 20 61 70 70 6c 69 63 |when you|r applic|
|00001bf0| 61 74 69 6f 6e 20 74 72 | 75 6c 79 20 6e 65 65 64 |ation tr|uly need|
|00001c00| 73 20 66 75 6c 6c 20 63 | 6f 6e 74 72 6f 6c 20 6f |s full c|ontrol o|
|00001c10| 66 20 74 68 65 20 63 6f | 6c 6f 72 20 74 61 62 6c |f the co|lor tabl|
|00001c20| 65 2e 0a 0a 5c 69 6e 64 | 65 6e 74 70 61 72 0a 49 |e...\ind|entpar.I|
|00001c30| 66 20 79 6f 75 20 72 65 | 71 75 65 73 74 20 6d 6f |f you re|quest mo|
|00001c40| 72 65 20 70 6c 61 6e 65 | 73 20 74 68 61 6e 20 61 |re plane|s than a|
|00001c50| 76 61 69 6c 61 62 6c 65 | 2c 20 61 6c 6c 20 61 76 |vailable|, all av|
|00001c60| 61 69 6c 61 62 6c 65 20 | 70 6c 61 6e 65 73 20 61 |ailable |planes a|
|00001c70| 72 65 20 61 6c 6c 6f 63 | 61 74 65 64 2c 0a 6a 75 |re alloc|ated,.ju|
|00001c80| 73 74 20 61 73 20 69 66 | 20 79 6f 75 20 72 65 71 |st as if| you req|
|00001c90| 75 65 73 74 65 64 20 60 | 60 30 27 27 20 70 6c 61 |uested `|`0'' pla|
|00001ca0| 6e 65 73 2e 20 20 49 6e | 71 75 69 72 79 20 69 73 |nes. In|quiry is|
|00001cb0| 20 74 68 75 73 20 79 6f | 75 72 20 6f 6e 6c 79 20 | thus yo|ur only |
|00001cc0| 77 61 79 20 6f 66 0a 64 | 65 74 65 72 6d 69 6e 69 |way of.d|etermini|
|00001cd0| 6e 67 20 65 78 61 63 74 | 6c 79 20 68 6f 77 20 6d |ng exact|ly how m|
|00001ce0| 61 6e 79 20 70 6c 61 6e | 65 73 20 61 72 65 20 61 |any plan|es are a|
|00001cf0| 76 61 69 6c 61 62 6c 65 | 2e 0a 0a 5c 6e 65 78 74 |vailable|...\next|
|00001d00| 73 79 6e 6f 70 73 69 73 | 0a 76 6f 69 64 20 53 52 |synopsis|.void SR|
|00001d10| 47 50 5f 74 72 61 63 69 | 6e 67 20 28 62 6f 6f 6c |GP_traci|ng (bool|
|00001d20| 65 61 6e 29 3b 0a 5c 65 | 6e 64 73 79 6e 6f 70 73 |ean);.\e|ndsynops|
|00001d30| 69 73 0a 57 68 65 6e 20 | 74 72 61 63 69 6e 67 20 |is.When |tracing |
|00001d40| 69 73 20 65 6e 61 62 6c | 65 64 2c 20 61 20 6d 65 |is enabl|ed, a me|
|00001d50| 73 73 61 67 65 20 69 73 | 20 73 65 6e 74 20 74 6f |ssage is| sent to|
|00001d60| 20 61 20 6c 6f 67 67 69 | 6e 67 20 66 69 6c 65 20 | a loggi|ng file |
|00001d70| 28 5c 63 6d 64 7b 53 52 | 47 50 6c 6f 67 66 69 6c |(\cmd{SR|GPlogfil|
|00001d80| 65 7d 0a 69 6e 20 74 68 | 65 20 63 75 72 72 65 6e |e}.in th|e curren|
|00001d90| 74 20 64 69 72 65 63 74 | 6f 72 79 29 20 65 61 63 |t direct|ory) eac|
|00001da0| 68 20 74 69 6d 65 20 74 | 68 65 20 61 70 70 6c 69 |h time t|he appli|
|00001db0| 63 61 74 69 6f 6e 20 63 | 61 6c 6c 73 20 61 6e 20 |cation c|alls an |
|00001dc0| 53 52 47 50 20 66 75 6e | 63 74 69 6f 6e 3b 0a 74 |SRGP fun|ction;.t|
|00001dd0| 68 65 20 6d 65 73 73 61 | 67 65 20 69 6e 63 6c 75 |he messa|ge inclu|
|00001de0| 64 65 73 20 65 63 68 6f | 69 6e 67 20 6f 66 20 6b |des echo|ing of k|
|00001df0| 65 79 20 70 61 72 61 6d | 65 74 65 72 73 2e 0a 5c |ey param|eters..\|
|00001e00| 62 6f 6c 64 69 74 7b 49 | 4d 50 4f 52 54 41 4e 54 |boldit{I|MPORTANT|
|00001e10| 3a 7d 20 0a 43 61 6c 6c | 73 20 74 6f 20 73 6f 6d |:} .Call|s to som|
|00001e20| 65 20 6f 66 20 74 68 65 | 20 69 6e 70 75 74 20 66 |e of the| input f|
|00001e30| 75 6e 63 74 69 6f 6e 73 | 20 61 72 65 20 4e 4f 54 |unctions| are NOT|
|00001e40| 20 74 72 61 63 65 64 3b | 20 73 65 65 20 73 65 63 | traced;| see sec|
|00001e50| 74 69 6f 6e 20 35 0a 66 | 6f 72 20 64 65 74 61 69 |tion 5.f|or detai|
|00001e60| 6c 73 2e 20 20 53 65 65 | 20 73 65 63 74 69 6f 6e |ls. See| section|
|00001e70| 20 37 20 66 6f 72 20 6d | 6f 72 65 20 69 6e 66 6f | 7 for m|ore info|
|00001e80| 72 6d 61 74 69 6f 6e 20 | 6f 6e 20 65 78 65 63 75 |rmation |on execu|
|00001e90| 74 69 6f 6e 20 77 69 74 | 68 20 74 72 61 63 69 6e |tion wit|h tracin|
|00001ea0| 67 2e 0a 0a 5c 69 6e 64 | 65 6e 74 70 61 72 0a 54 |g...\ind|entpar.T|
|00001eb0| 68 65 20 69 6e 69 74 69 | 61 6c 20 73 74 61 74 75 |he initi|al statu|
|00001ec0| 73 20 6f 66 20 74 72 61 | 63 69 6e 67 20 69 73 20 |s of tra|cing is |
|00001ed0| 73 65 74 20 77 68 65 6e | 20 74 68 65 20 61 70 70 |set when| the app|
|00001ee0| 6c 69 63 61 74 69 6f 6e | 20 63 61 6c 6c 73 0a 5c |lication| calls.\|
|00001ef0| 74 74 69 74 7b 53 52 47 | 50 5c 5f 62 65 67 69 6e |ttit{SRG|P\_begin|
|00001f00| 7d 2c 20 62 75 74 20 69 | 74 20 6d 61 79 20 62 65 |}, but i|t may be|
|00001f10| 20 63 68 61 6e 67 65 64 | 20 61 74 20 61 6e 79 20 | changed| at any |
|00001f20| 74 69 6d 65 20 76 69 61 | 20 61 20 63 61 6c 6c 20 |time via| a call |
|00001f30| 74 6f 0a 5c 74 74 69 74 | 7b 53 52 47 50 5c 5f 74 |to.\ttit|{SRGP\_t|
|00001f40| 72 61 63 69 6e 67 7d 2e | 0a 0a 0a 5c 6e 65 78 74 |racing}.|...\next|
|00001f50| 73 79 6e 6f 70 73 69 73 | 0a 76 6f 69 64 20 53 52 |synopsis|.void SR|
|00001f60| 47 50 5f 61 6c 6c 6f 77 | 52 65 73 69 7a 65 20 28 |GP_allow|Resize (|
|00001f70| 62 6f 6f 6c 65 61 6e 29 | 3b 0a 5c 65 6e 64 73 79 |boolean)|;.\endsy|
|00001f80| 6e 6f 70 73 69 73 0a 42 | 79 20 64 65 66 61 75 6c |nopsis.B|y defaul|
|00001f90| 74 2c 20 74 68 65 20 73 | 63 72 65 65 6e 2d 63 61 |t, the s|creen-ca|
|00001fa0| 6e 76 61 73 20 77 69 6e | 64 6f 77 20 63 61 6e 6e |nvas win|dow cann|
|00001fb0| 6f 74 20 62 65 20 72 65 | 73 69 7a 65 64 20 62 79 |ot be re|sized by|
|00001fc0| 20 74 68 65 20 75 73 65 | 72 2e 20 20 49 74 20 69 | the use|r. It i|
|00001fd0| 73 0a 61 64 76 69 73 61 | 62 6c 65 20 74 68 61 74 |s.advisa|ble that|
|00001fe0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 6c 69 | applica|tions li|
|00001ff0| 76 65 20 77 69 74 68 20 | 74 68 69 73 20 72 65 73 |ve with |this res|
|00002000| 74 72 69 63 74 69 6f 6e | 2e 20 20 54 68 65 20 72 |triction|. The r|
|00002010| 61 72 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 0a |are appl|ication.|
|00002020| 74 68 61 74 20 6e 65 65 | 64 73 20 74 6f 20 61 6c |that nee|ds to al|
|00002030| 6c 6f 77 20 72 65 73 69 | 7a 69 6e 67 20 63 61 6e |low resi|zing can|
|00002040| 20 75 73 65 20 74 68 69 | 73 20 72 6f 75 74 69 6e | use thi|s routin|
|00002050| 65 2e 20 20 49 74 20 69 | 73 20 69 6d 70 6f 72 74 |e. It i|s import|
|00002060| 61 6e 74 20 74 6f 20 6e | 6f 74 65 0a 74 68 61 74 |ant to n|ote.that|
|00002070| 20 76 61 72 69 6f 75 73 | 20 61 72 74 69 66 61 63 | various| artifac|
|00002080| 74 73 20 6f 63 63 75 72 | 20 77 68 65 6e 20 74 68 |ts occur| when th|
|00002090| 65 20 75 73 65 72 20 61 | 63 74 75 61 6c 6c 79 20 |e user a|ctually |
|000020a0| 64 6f 65 73 20 74 61 6b | 65 20 61 64 76 61 6e 74 |does tak|e advant|
|000020b0| 61 67 65 20 6f 66 20 74 | 68 69 73 0a 66 72 65 65 |age of t|his.free|
|000020c0| 64 6f 6d 20 61 6e 64 20 | 70 65 72 66 6f 72 6d 20 |dom and |perform |
|000020d0| 61 20 72 65 73 69 7a 65 | 3a 0a 5c 69 74 65 6d 6d |a resize|:.\itemm|
|000020e0| 7b 31 29 7d 20 54 68 65 | 20 77 69 6e 64 6f 77 20 |{1)} The| window |
|000020f0| 69 73 20 63 6c 65 61 72 | 65 64 20 74 6f 20 63 6f |is clear|ed to co|
|00002100| 6c 6f 72 20 30 3b 20 61 | 6e 79 20 69 6e 66 6f 72 |lor 0; a|ny infor|
|00002110| 6d 61 74 69 6f 6e 20 74 | 68 61 74 20 77 61 73 20 |mation t|hat was |
|00002120| 6f 6e 20 74 68 65 0a 73 | 63 72 65 65 6e 20 6a 75 |on the.s|creen ju|
|00002130| 73 74 20 62 65 66 6f 72 | 65 20 74 68 65 20 72 65 |st befor|e the re|
|00002140| 73 69 7a 65 20 69 73 20 | 6c 6f 73 74 2e 0a 5c 69 |size is |lost..\i|
|00002150| 74 65 6d 6d 7b 32 29 7d | 20 54 68 65 20 63 6c 69 |temm{2)}| The cli|
|00002160| 70 20 72 65 63 74 61 6e | 67 6c 65 20 61 74 74 72 |p rectan|gle attr|
|00002170| 69 62 75 74 65 20 69 73 | 20 5c 62 6f 6c 64 69 74 |ibute is| \boldit|
|00002180| 7b 6e 6f 74 7d 20 63 68 | 61 6e 67 65 64 20 61 75 |{not} ch|anged au|
|00002190| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 3b 0a 74 68 65 |tomatica|lly;.the|
|000021a0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 6d 75 73 | applica|tion mus|
|000021b0| 74 20 62 65 20 72 65 73 | 70 6f 6e 73 69 62 6c 65 |t be res|ponsible|
|000021c0| 20 66 6f 72 20 63 68 61 | 6e 67 69 6e 67 20 69 74 | for cha|nging it|
|000021d0| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 2e 0a 5c | if nece|ssary..\|
|000021e0| 6e 65 77 70 61 72 0a 4f | 62 76 69 6f 75 73 6c 79 |newpar.O|bviously|
|000021f0| 2c 20 61 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |, an app|lication|
|00002200| 20 74 68 61 74 20 61 6c | 6c 6f 77 73 20 72 65 73 | that al|lows res|
|00002210| 69 7a 69 6e 67 20 6d 75 | 73 74 20 62 65 20 69 6e |izing mu|st be in|
|00002220| 66 6f 72 6d 65 64 20 77 | 68 65 6e 65 76 65 72 20 |formed w|henever |
|00002230| 61 0a 72 65 73 69 7a 65 | 20 6f 63 63 75 72 73 2c |a.resize| occurs,|
|00002240| 20 74 6f 20 63 6f 70 65 | 20 77 69 74 68 20 74 68 | to cope| with th|
|00002250| 65 20 61 66 6f 72 65 6d | 65 6e 74 69 6f 6e 65 64 |e aforem|entioned|
|00002260| 20 70 72 6f 62 6c 65 6d | 73 20 61 6e 64 20 6f 74 | problem|s and ot|
|00002270| 68 65 72 0a 61 70 70 6c | 69 63 61 74 69 6f 6e 2d |her.appl|ication-|
|00002280| 73 70 65 63 69 66 69 63 | 20 6f 6e 65 73 2e 20 20 |specific| ones. |
|00002290| 53 52 47 50 20 70 72 6f | 76 69 64 65 73 20 61 20 |SRGP pro|vides a |
|000022a0| 63 61 6c 6c 62 61 63 6b | 20 75 74 69 6c 69 74 79 |callback| utility|
|000022b0| 2c 20 77 68 69 63 68 20 | 61 6c 6c 6f 77 73 20 61 |, which |allows a|
|000022c0| 6e 0a 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 6f |n.applic|ation to|
|000022d0| 20 70 72 6f 76 69 64 65 | 20 61 20 66 75 6e 63 74 | provide| a funct|
|000022e0| 69 6f 6e 20 74 6f 20 62 | 65 20 63 61 6c 6c 65 64 |ion to b|e called|
|000022f0| 20 77 68 65 6e 65 76 65 | 72 20 61 20 72 65 73 69 | wheneve|r a resi|
|00002300| 7a 65 20 68 61 73 20 6f | 63 63 75 72 72 65 64 3a |ze has o|ccurred:|
|00002310| 0a 0a 0a 5c 6e 65 78 74 | 73 79 6e 6f 70 73 69 73 |...\next|synopsis|
|00002320| 0a 74 79 70 65 64 65 66 | 20 69 6e 74 20 28 2a 66 |.typedef| int (*f|
|00002330| 75 6e 63 70 74 72 29 28 | 29 3b 0a 76 6f 69 64 20 |uncptr)(|);.void |
|00002340| 53 52 47 50 5f 72 65 67 | 69 73 74 65 72 52 65 73 |SRGP_reg|isterRes|
|00002350| 69 7a 65 43 61 6c 6c 62 | 61 63 6b 20 28 66 75 6e |izeCallb|ack (fun|
|00002360| 63 70 74 72 29 3b 0a 5c | 65 6e 64 73 79 6e 6f 70 |cptr);.\|endsynop|
|00002370| 73 69 73 0a 54 68 65 20 | 61 70 70 6c 69 63 61 74 |sis.The |applicat|
|00002380| 69 6f 6e 2d 70 72 6f 76 | 69 64 65 64 20 63 61 6c |ion-prov|ided cal|
|00002390| 6c 62 61 63 6b 20 66 75 | 6e 63 74 69 6f 6e 20 72 |lback fu|nction r|
|000023a0| 65 66 65 72 72 65 64 20 | 74 6f 20 62 79 20 74 68 |eferred |to by th|
|000023b0| 65 20 66 75 6e 63 74 69 | 6f 6e 2d 70 6f 69 6e 74 |e functi|on-point|
|000023c0| 65 72 0a 70 61 72 61 6d | 65 74 65 72 20 77 69 6c |er.param|eter wil|
|000023d0| 6c 20 62 65 20 63 61 6c | 6c 65 64 20 77 68 65 6e |l be cal|led when|
|000023e0| 65 76 65 72 20 61 20 72 | 65 73 69 7a 65 20 68 61 |ever a r|esize ha|
|000023f0| 73 20 6f 63 63 75 72 72 | 65 64 2e 20 20 54 68 65 |s occurr|ed. The|
|00002400| 20 63 61 6c 6c 62 61 63 | 6b 20 66 75 6e 63 74 69 | callbac|k functi|
|00002410| 6f 6e 0a 77 69 6c 6c 20 | 72 65 63 65 69 76 65 20 |on.will |receive |
|00002420| 74 77 6f 20 69 6e 74 65 | 67 65 72 73 3a 20 20 74 |two inte|gers: t|
|00002430| 68 65 20 6e 65 77 20 77 | 69 64 74 68 20 61 6e 64 |he new w|idth and|
|00002440| 20 74 68 65 20 6e 65 77 | 20 68 65 69 67 68 74 2e | the new| height.|
|00002450| 0a 0a 0a 5c 6e 65 78 74 | 73 79 6e 6f 70 73 69 73 |...\next|synopsis|
|00002460| 0a 76 6f 69 64 20 53 52 | 47 50 5f 63 68 61 6e 67 |.void SR|GP_chang|
|00002470| 65 53 63 72 65 65 6e 43 | 61 6e 76 61 73 53 69 7a |eScreenC|anvasSiz|
|00002480| 65 20 28 69 6e 74 20 6e | 65 77 77 69 64 74 68 2c |e (int n|ewwidth,|
|00002490| 20 69 6e 74 20 6e 65 77 | 68 65 69 67 68 74 29 3b | int new|height);|
|000024a0| 0a 5c 65 6e 64 73 79 6e | 6f 70 73 69 73 0a 54 68 |.\endsyn|opsis.Th|
|000024b0| 69 73 20 72 6f 75 74 69 | 6e 65 20 61 6c 6c 6f 77 |is routi|ne allow|
|000024c0| 73 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |s the ap|plicatio|
|000024d0| 6e 20 74 6f 20 6d 6f 64 | 69 66 79 20 74 68 65 20 |n to mod|ify the |
|000024e0| 73 69 7a 65 20 6f 66 20 | 74 68 65 20 73 63 72 65 |size of |the scre|
|000024f0| 65 6e 20 63 61 6e 76 61 | 73 2e 0a 41 73 20 61 20 |en canva|s..As a |
|00002500| 73 69 64 65 2d 65 66 66 | 65 63 74 2c 20 74 68 65 |side-eff|ect, the|
|00002510| 20 72 65 73 69 7a 65 2d | 63 61 6c 6c 62 61 63 6b | resize-|callback|
|00002520| 20 66 75 6e 63 74 69 6f | 6e 20 28 69 66 20 61 6e | functio|n (if an|
|00002530| 79 29 20 69 73 20 63 61 | 6c 6c 65 64 2c 20 6a 75 |y) is ca|lled, ju|
|00002540| 73 74 20 61 73 20 69 66 | 0a 74 68 65 20 75 73 65 |st as if|.the use|
|00002550| 72 20 68 61 64 20 72 65 | 71 75 65 73 74 65 64 20 |r had re|quested |
|00002560| 74 68 65 20 72 65 73 69 | 7a 65 2e 0a 0a 0a 0a 5c |the resi|ze.....\|
|00002570| 69 66 58 31 31 7b 5c 6e | 65 78 74 73 79 6e 6f 70 |ifX11{\n|extsynop|
|00002580| 73 69 73 7d 0a 5c 69 66 | 58 31 31 7b 76 6f 69 64 |sis}.\if|X11{void|
|00002590| 20 53 52 47 50 5f 65 6e | 61 62 6c 65 53 79 6e 63 | SRGP_en|ableSync|
|000025a0| 68 72 6f 6e 6f 75 73 20 | 28 76 6f 69 64 29 3b 7d |hronous |(void);}|
|000025b0| 0a 5c 69 66 58 31 31 7b | 5c 65 6e 64 73 79 6e 6f |.\ifX11{|\endsyno|
|000025c0| 70 73 69 73 7d 0a 5c 69 | 66 58 31 31 7b 41 6c 6c |psis}.\i|fX11{All|
|000025d0| 6f 77 73 20 79 6f 75 20 | 74 6f 20 65 6e 61 62 6c |ows you |to enabl|
|000025e0| 65 20 58 27 73 20 73 79 | 6e 63 68 72 6f 6e 6f 75 |e X's sy|nchronou|
|000025f0| 73 20 6d 6f 64 65 2c 20 | 61 20 75 73 65 66 75 6c |s mode, |a useful|
|00002600| 20 6d 6f 64 65 20 66 6f | 72 20 64 65 62 75 67 67 | mode fo|r debugg|
|00002610| 69 6e 67 2e 0a 54 68 65 | 20 6d 6f 64 65 20 69 73 |ing..The| mode is|
|00002620| 20 64 69 73 63 75 73 73 | 65 64 20 72 69 67 6f 72 | discuss|ed rigor|
|00002630| 6f 75 73 6c 79 20 69 6e | 20 73 65 63 74 69 6f 6e |ously in| section|
|00002640| 20 33 2c 20 61 6e 64 20 | 61 67 61 69 6e 20 69 6e | 3, and |again in|
|00002650| 20 73 65 63 74 69 6f 6e | 20 37 2e 7d 0a 0a 0a 5c | section| 7.}...\|
|00002660| 6e 65 78 74 73 79 6e 6f | 70 73 69 73 0a 76 6f 69 |nextsyno|psis.voi|
|00002670| 64 20 53 52 47 50 5f 65 | 6e 64 20 28 76 6f 69 64 |d SRGP_e|nd (void|
|00002680| 29 3b 0a 5c 65 6e 64 73 | 79 6e 6f 70 73 69 73 0a |);.\ends|ynopsis.|
|00002690| 54 68 65 20 73 63 72 65 | 65 6e 2d 63 61 6e 76 61 |The scre|en-canva|
|000026a0| 73 20 77 69 6e 64 6f 77 | 20 69 73 20 64 65 6c 65 |s window| is dele|
|000026b0| 74 65 64 2c 20 5c 69 66 | 4d 61 63 7b 74 68 65 20 |ted, \if|Mac{the |
|000026c0| 4d 61 63 27 73 20 63 6f | 6c 6f 72 20 74 61 62 6c |Mac's co|lor tabl|
|000026d0| 65 20 69 73 20 72 65 73 | 74 6f 72 65 64 0a 74 6f |e is res|tored.to|
|000026e0| 20 6e 6f 72 6d 61 6c 2c | 7d 20 61 6e 64 20 74 68 | normal,|} and th|
|000026f0| 65 20 6c 6f 67 67 69 6e | 67 20 66 69 6c 65 20 69 |e loggin|g file i|
|00002700| 73 20 63 6c 6f 73 65 64 | 2e 20 20 5c 69 66 4d 61 |s closed|. \ifMa|
|00002710| 63 7b 57 61 72 6e 69 6e | 67 3a 20 65 6e 73 75 72 |c{Warnin|g: ensur|
|00002720| 65 20 74 68 61 74 0a 79 | 6f 75 72 20 61 70 70 6c |e that.y|our appl|
|00002730| 69 63 61 74 69 6f 6e 20 | 63 61 6c 6c 73 20 74 68 |ication |calls th|
|00002740| 69 73 20 69 6e 20 61 6c | 6c 20 6f 66 20 69 74 73 |is in al|l of its|
|00002750| 20 65 78 69 74 20 70 61 | 74 68 73 21 20 20 53 65 | exit pa|ths! Se|
|00002760| 65 20 73 65 63 74 69 6f | 6e 20 39 20 66 6f 72 0a |e sectio|n 9 for.|
|00002770| 72 65 6c 61 74 65 64 20 | 69 6e 66 6f 72 6d 61 74 |related |informat|
|00002780| 69 6f 6e 20 6f 6e 20 74 | 68 65 20 61 64 76 65 72 |ion on t|he adver|
|00002790| 73 65 20 65 66 66 65 63 | 74 73 20 6f 66 20 66 61 |se effec|ts of fa|
|000027a0| 69 6c 69 6e 67 20 74 6f | 20 63 61 6c 6c 20 74 68 |iling to| call th|
|000027b0| 69 73 2e 7d 0a 0a 25 25 | 25 25 25 25 25 25 25 25 |is.}..%%|%%%%%%%%|
|000027c0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000027d0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000027e0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000027f0| 25 25 25 25 0a 0a 5c 6d | 61 6a 6f 72 73 65 63 74 |%%%%..\m|ajorsect|
|00002800| 7b 32 7d 7b 43 61 6e 76 | 61 73 65 73 7d 0a 53 52 |{2}{Canv|ases}.SR|
|00002810| 47 50 20 70 72 6f 63 65 | 64 75 72 65 73 20 6f 70 |GP proce|dures op|
|00002820| 65 72 61 74 65 20 6f 6e | 20 5c 69 74 69 74 7b 63 |erate on| \itit{c|
|00002830| 61 6e 76 61 73 65 73 7d | 2c 20 61 20 63 61 6e 76 |anvases}|, a canv|
|00002840| 61 73 20 62 65 69 6e 67 | 20 61 20 32 44 20 61 72 |as being| a 2D ar|
|00002850| 72 61 79 20 6f 66 20 70 | 69 78 65 6c 73 0a 28 61 |ray of p|ixels.(a|
|00002860| 20 76 69 72 74 75 61 6c | 20 66 72 61 6d 65 2d 62 | virtual| frame-b|
|00002870| 75 66 66 65 72 29 2c 20 | 77 68 6f 73 65 20 64 65 |uffer), |whose de|
|00002880| 70 74 68 20 69 73 20 74 | 68 65 20 6e 75 6d 62 65 |pth is t|he numbe|
|00002890| 72 20 6f 66 20 70 6c 61 | 6e 65 73 20 72 65 71 75 |r of pla|nes requ|
|000028a0| 65 73 74 65 64 20 62 79 | 20 74 68 65 0a 61 70 70 |ested by| the.app|
|000028b0| 6c 69 63 61 74 69 6f 6e | 20 28 76 69 61 20 74 68 |lication| (via th|
|000028c0| 65 20 66 6f 75 72 74 68 | 20 70 61 72 61 6d 65 74 |e fourth| paramet|
|000028d0| 65 72 20 74 6f 20 5c 74 | 74 69 74 7b 53 52 47 50 |er to \t|tit{SRGP|
|000028e0| 5c 5f 62 65 67 69 6e 7d | 29 2e 0a 0a 5c 6e 65 77 |\_begin}|)...\new|
|000028f0| 70 61 72 0a 45 61 63 68 | 20 63 61 6e 76 61 73 20 |par.Each| canvas |
|00002900| 68 61 73 20 69 74 73 20 | 6f 77 6e 20 6c 6f 63 61 |has its |own loca|
|00002910| 6c 20 63 6f 6f 72 64 69 | 6e 61 74 65 20 73 79 73 |l coordi|nate sys|
|00002920| 74 65 6d 2e 20 20 54 68 | 65 20 6f 72 69 67 69 6e |tem. Th|e origin|
|00002930| 20 24 28 30 2c 30 29 24 | 20 66 6f 72 20 74 68 65 | $(0,0)$| for the|
|00002940| 0a 6c 6f 63 61 6c 20 63 | 6f 6f 72 64 69 6e 61 74 |.local c|oordinat|
|00002950| 65 20 73 79 73 74 65 6d | 20 69 73 20 74 68 65 20 |e system| is the |
|00002960| 6c 6f 77 65 72 2d 6c 65 | 66 74 20 63 6f 72 6e 65 |lower-le|ft corne|
|00002970| 72 20 6f 66 20 74 68 65 | 20 63 61 6e 76 61 73 2c |r of the| canvas,|
|00002980| 20 77 69 74 68 20 74 68 | 65 0a 58 2d 63 6f 6f 72 | with th|e.X-coor|
|00002990| 64 69 6e 61 74 65 20 69 | 6e 63 72 65 61 73 69 6e |dinate i|ncreasin|
|000029a0| 67 20 74 6f 20 74 68 65 | 20 72 69 67 68 74 2c 20 |g to the| right, |
|000029b0| 61 6e 64 20 74 68 65 20 | 59 2d 63 6f 6f 72 64 69 |and the |Y-coordi|
|000029c0| 6e 61 74 65 20 69 6e 63 | 72 65 61 73 69 6e 67 20 |nate inc|reasing |
|000029d0| 74 6f 77 61 72 64 73 0a | 74 68 65 20 74 6f 70 2e |towards.|the top.|
|000029e0| 20 20 54 68 65 20 63 6f | 6f 72 64 69 6e 61 74 65 | The co|ordinate|
|000029f0| 73 20 70 61 73 73 65 64 | 20 74 6f 20 61 6c 6c 20 |s passed| to all |
|00002a00| 70 72 69 6d 69 74 69 76 | 65 2d 67 65 6e 65 72 61 |primitiv|e-genera|
|00002a10| 74 69 6f 6e 20 70 72 6f | 63 65 64 75 72 65 73 20 |tion pro|cedures |
|00002a20| 61 72 65 20 69 6e 0a 74 | 65 72 6d 73 20 6f 66 20 |are in.t|erms of |
|00002a30| 74 68 65 20 6c 6f 63 61 | 6c 20 63 6f 6f 72 64 69 |the loca|l coordi|
|00002a40| 6e 61 74 65 20 73 79 73 | 74 65 6d 20 6f 66 20 74 |nate sys|tem of t|
|00002a50| 68 65 20 5c 69 74 69 74 | 7b 63 75 72 72 65 6e 74 |he \itit|{current|
|00002a60| 6c 79 2d 61 63 74 69 76 | 65 20 63 61 6e 76 61 73 |ly-activ|e canvas|
|00002a70| 7d 2e 0a 0a 5c 6e 65 77 | 70 61 72 0a 41 74 20 61 |}...\new|par.At a|
|00002a80| 6e 79 20 67 69 76 65 6e | 20 74 69 6d 65 2c 20 6f |ny given| time, o|
|00002a90| 6e 65 20 63 61 6e 76 61 | 73 20 69 73 20 61 63 74 |ne canva|s is act|
|00002aa0| 69 76 65 3a 20 69 74 20 | 69 73 20 74 68 65 20 63 |ive: it |is the c|
|00002ab0| 61 6e 76 61 73 20 62 65 | 69 6e 67 20 6d 6f 64 69 |anvas be|ing modi|
|00002ac0| 66 69 65 64 2e 0a 41 73 | 73 6f 63 69 61 74 65 64 |fied..As|sociated|
|00002ad0| 20 77 69 74 68 20 65 61 | 63 68 20 63 61 6e 76 61 | with ea|ch canva|
|00002ae0| 73 20 69 73 20 61 20 67 | 72 6f 75 70 20 6f 66 0a |s is a g|roup of.|
|00002af0| 5c 69 74 69 74 7b 61 74 | 74 72 69 62 75 74 65 73 |\itit{at|tributes|
|00002b00| 7d 20 77 68 69 63 68 20 | 61 66 66 65 63 74 20 61 |} which |affect a|
|00002b10| 6c 6c 20 64 72 61 77 69 | 6e 67 20 69 6e 74 6f 20 |ll drawi|ng into |
|00002b20| 74 68 61 74 20 63 61 6e | 76 61 73 2e 20 20 4d 6f |that can|vas. Mo|
|00002b30| 64 69 66 69 63 61 74 69 | 6f 6e 20 6f 66 0a 74 68 |dificati|on of.th|
|00002b40| 65 73 65 20 61 74 74 72 | 69 62 75 74 65 73 20 69 |ese attr|ibutes i|
|00002b50| 73 20 6f 6e 6c 79 20 70 | 6f 73 73 69 62 6c 65 20 |s only p|ossible |
|00002b60| 77 68 65 6e 20 74 68 65 | 20 63 6f 72 72 65 73 70 |when the| corresp|
|00002b70| 6f 6e 64 69 6e 67 20 63 | 61 6e 76 61 73 20 69 73 |onding c|anvas is|
|00002b80| 20 63 75 72 72 65 6e 74 | 6c 79 0a 61 63 74 69 76 | current|ly.activ|
|00002b90| 65 2e 20 20 57 68 65 6e | 20 61 20 63 61 6e 76 61 |e. When| a canva|
|00002ba0| 73 20 69 73 20 63 72 65 | 61 74 65 64 2c 20 69 74 |s is cre|ated, it|
|00002bb0| 73 20 61 74 74 72 69 62 | 75 74 65 20 67 72 6f 75 |s attrib|ute grou|
|00002bc0| 70 20 69 73 20 69 6e 69 | 74 69 61 6c 69 7a 65 64 |p is ini|tialized|
|00002bd0| 20 74 6f 0a 73 74 61 6e | 64 61 72 64 20 64 65 66 | to.stan|dard def|
|00002be0| 61 75 6c 74 20 76 61 6c | 75 65 73 2e 0a 0a 5c 6e |ault val|ues...\n|
|00002bf0| 65 77 70 61 72 0a 45 61 | 63 68 20 63 61 6e 76 61 |ewpar.Ea|ch canva|
|00002c00| 73 20 69 73 20 69 64 65 | 6e 74 69 66 69 65 64 20 |s is ide|ntified |
|00002c10| 62 79 20 61 20 75 6e 69 | 71 75 65 20 69 6e 74 65 |by a uni|que inte|
|00002c20| 67 65 72 20 5c 69 74 69 | 74 7b 63 61 6e 76 61 73 |ger \iti|t{canvas|
|00002c30| 20 69 6e 64 65 78 7d 2e | 20 20 57 68 65 6e 20 53 | index}.| When S|
|00002c40| 52 47 50 0a 69 73 20 65 | 6e 61 62 6c 65 64 2c 20 |RGP.is e|nabled, |
|00002c50| 6f 6e 65 20 63 61 6e 76 | 61 73 20 61 6c 72 65 61 |one canv|as alrea|
|00002c60| 64 79 20 65 78 69 73 74 | 73 20 61 6e 64 20 69 73 |dy exist|s and is|
|00002c70| 20 61 63 74 69 76 65 3a | 20 74 68 65 20 5c 69 74 | active:| the \it|
|00002c80| 69 74 7b 73 63 72 65 65 | 6e 20 63 61 6e 76 61 73 |it{scree|n canvas|
|00002c90| 7d 2c 0a 68 61 76 69 6e | 67 20 69 6e 64 65 78 20 |},.havin|g index |
|00002ca0| 30 2c 20 77 68 6f 73 65 | 20 68 65 69 67 68 74 20 |0, whose| height |
|00002cb0| 61 6e 64 20 77 69 64 74 | 68 20 61 72 65 20 64 65 |and widt|h are de|
|00002cc0| 74 65 72 6d 69 6e 65 64 | 20 66 72 6f 6d 20 74 68 |termined| from th|
|00002cd0| 65 20 70 61 72 61 6d 65 | 74 65 72 73 20 74 6f 0a |e parame|ters to.|
|00002ce0| 5c 74 74 69 74 7b 53 52 | 47 50 5c 5f 62 65 67 69 |\ttit{SR|GP\_begi|
|00002cf0| 6e 7d 2e 20 20 54 68 65 | 20 73 63 72 65 65 6e 20 |n}. The| screen |
|00002d00| 63 61 6e 76 61 73 20 69 | 73 20 74 68 65 20 6f 6e |canvas i|s the on|
|00002d10| 6c 79 20 63 61 6e 76 61 | 73 20 77 68 69 63 68 20 |ly canva|s which |
|00002d20| 69 73 20 5c 69 74 69 74 | 7b 65 76 65 72 7d 0a 76 |is \itit|{ever}.v|
|00002d30| 69 73 69 62 6c 65 2e 20 | 20 4e 6f 20 6d 6f 72 65 |isible. | No more|
|00002d40| 20 74 68 61 6e 0a 5c 74 | 74 69 74 7b 4d 41 58 5c | than.\t|tit{MAX\|
|00002d50| 5f 43 41 4e 56 41 53 5c | 5f 49 4e 44 45 58 7d 24 |_CANVAS\|_INDEX}$|
|00002d60| 2b 31 24 20 63 61 6e 76 | 61 73 65 73 20 28 69 6e |+1$ canv|ases (in|
|00002d70| 63 6c 75 64 69 6e 67 20 | 74 68 65 20 73 63 72 65 |cluding |the scre|
|00002d80| 65 6e 29 20 6d 61 79 20 | 62 65 20 65 78 74 61 6e |en) may |be extan|
|00002d90| 74 0a 73 69 6d 75 6c 74 | 61 6e 65 6f 75 73 6c 79 |t.simult|aneously|
|00002da0| 2e 0a 0a 0a 0a 5c 6e 65 | 77 70 61 72 0a 43 61 6e |.....\ne|wpar.Can|
|00002db0| 76 61 73 65 73 20 6d 61 | 79 20 62 65 20 6d 61 6e |vases ma|y be man|
|00002dc0| 69 70 75 6c 61 74 65 64 | 20 62 79 20 74 68 65 20 |ipulated| by the |
|00002dd0| 66 6f 6c 6c 6f 77 69 6e | 67 20 70 72 6f 63 65 64 |followin|g proced|
|00002de0| 75 72 65 73 3a 0a 0a 0a | 0a 5c 6e 65 77 73 79 6e |ures:...|.\newsyn|
|00002df0| 6f 70 73 69 73 0a 74 79 | 70 65 64 65 66 20 69 6e |opsis.ty|pedef in|
|00002e00| 74 20 63 61 6e 76 61 73 | 49 44 3b 0a 63 61 6e 76 |t canvas|ID;.canv|
|00002e10| 61 73 49 44 20 53 52 47 | 50 5f 63 72 65 61 74 65 |asID SRG|P_create|
|00002e20| 43 61 6e 76 61 73 20 28 | 69 6e 74 20 77 69 64 74 |Canvas (|int widt|
|00002e30| 68 2c 20 69 6e 74 20 68 | 65 69 67 68 74 29 3b 0a |h, int h|eight);.|
|00002e40| 5c 65 6e 64 73 79 6e 6f | 70 73 69 73 0a 41 6e 20 |\endsyno|psis.An |
|00002e50| 69 6e 76 69 73 69 62 6c | 65 20 63 61 6e 76 61 73 |invisibl|e canvas|
|00002e60| 20 6f 66 20 74 68 65 20 | 73 70 65 63 69 66 69 65 | of the |specifie|
|00002e70| 64 20 64 69 6d 65 6e 73 | 69 6f 6e 73 20 69 73 20 |d dimens|ions is |
|00002e80| 63 72 65 61 74 65 64 20 | 61 6e 64 20 69 74 73 20 |created |and its |
|00002e90| 75 6e 69 71 75 65 20 69 | 6e 64 65 78 0a 69 73 20 |unique i|ndex.is |
|00002ea0| 72 65 74 75 72 6e 65 64 | 2e 20 20 54 68 65 20 6e |returned|. The n|
|00002eb0| 65 77 20 63 61 6e 76 61 | 73 27 20 6c 6f 63 61 6c |ew canva|s' local|
|00002ec0| 2d 63 6f 6f 72 64 69 6e | 61 74 65 2d 73 79 73 74 |-coordin|ate-syst|
|00002ed0| 65 6d 20 6f 72 69 67 69 | 6e 20 24 28 30 2c 30 29 |em origi|n $(0,0)|
|00002ee0| 24 20 66 6f 72 6d 73 20 | 74 68 65 0a 6c 6f 77 65 |$ forms |the.lowe|
|00002ef0| 72 2d 6c 65 66 74 20 63 | 6f 72 6e 65 72 2e 20 20 |r-left c|orner. |
|00002f00| 24 28 77 69 64 74 68 2d | 31 2c 24 20 24 68 65 69 |$(width-|1,$ $hei|
|00002f10| 67 68 74 2d 31 29 24 20 | 66 6f 72 6d 73 0a 74 68 |ght-1)$ |forms.th|
|00002f20| 65 20 75 70 70 65 72 2d | 72 69 67 68 74 20 63 6f |e upper-|right co|
|00002f30| 72 6e 65 72 2e 20 20 54 | 68 65 20 70 69 78 65 6c |rner. T|he pixel|
|00002f40| 73 20 6f 66 20 61 0a 63 | 61 6e 76 61 73 20 69 6e |s of a.c|anvas in|
|00002f50| 69 74 69 61 6c 6c 79 20 | 73 74 6f 72 65 20 63 6f |itially |store co|
|00002f60| 6c 6f 72 20 69 6e 64 65 | 78 20 30 2e 20 20 4f 6e |lor inde|x 0. On|
|00002f70| 63 65 20 61 20 63 61 6e | 76 61 73 20 69 73 20 63 |ce a can|vas is c|
|00002f80| 72 65 61 74 65 64 2c 20 | 69 74 0a 63 61 6e 20 6e |reated, |it.can n|
|00002f90| 6f 74 20 62 65 20 72 65 | 73 69 7a 65 64 2e 20 20 |ot be re|sized. |
|00002fa0| 28 54 68 65 20 73 63 72 | 65 65 6e 20 63 61 6e 76 |(The scr|een canv|
|00002fb0| 61 73 20 69 73 20 61 6e | 20 65 78 63 65 70 74 69 |as is an| excepti|
|00002fc0| 6f 6e 2c 20 62 75 74 20 | 69 74 20 63 61 6e 20 6f |on, but |it can o|
|00002fd0| 6e 6c 79 20 62 65 0a 72 | 65 73 69 7a 65 64 20 62 |nly be.r|esized b|
|00002fe0| 79 20 74 68 65 20 75 73 | 65 72 2c 20 6e 6f 74 20 |y the us|er, not |
|00002ff0| 62 79 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |by the a|pplicati|
|00003000| 6f 6e 2e 29 20 20 55 70 | 6f 6e 20 72 65 74 75 72 |on.) Up|on retur|
|00003010| 6e 2c 20 74 68 65 20 6e | 65 77 0a 63 61 6e 76 61 |n, the n|ew.canva|
|00003020| 73 20 28 61 6e 64 20 69 | 74 73 20 63 6f 72 72 65 |s (and i|ts corre|
|00003030| 73 70 6f 6e 64 69 6e 67 | 20 61 74 74 72 69 62 75 |sponding| attribu|
|00003040| 74 65 20 67 72 6f 75 70 | 29 20 61 72 65 20 61 63 |te group|) are ac|
|00003050| 74 69 76 65 2e 20 20 49 | 66 20 61 20 6e 65 77 20 |tive. I|f a new |
|00003060| 63 61 6e 76 61 73 0a 63 | 61 6e 6e 6f 74 20 62 65 |canvas.c|annot be|
|00003070| 20 63 72 65 61 74 65 64 | 2c 20 30 20 69 73 20 72 | created|, 0 is r|
|00003080| 65 74 75 72 6e 65 64 2e | 0a 0a 0a 5c 6e 65 78 74 |eturned.|...\next|
|00003090| 73 79 6e 6f 70 73 69 73 | 0a 76 6f 69 64 20 53 52 |synopsis|.void SR|
|000030a0| 47 50 5f 64 65 6c 65 74 | 65 43 61 6e 76 61 73 20 |GP_delet|eCanvas |
|000030b0| 28 63 61 6e 76 61 73 49 | 44 29 3b 0a 5c 65 6e 64 |(canvasI|D);.\end|
|000030c0| 73 79 6e 6f 70 73 69 73 | 0a 4e 6f 20 63 61 6e 76 |synopsis|.No canv|
|000030d0| 61 73 20 6d 61 79 20 62 | 65 20 64 65 6c 65 74 65 |as may b|e delete|
|000030e0| 64 20 77 68 69 6c 65 20 | 69 74 20 69 73 20 61 63 |d while |it is ac|
|000030f0| 74 69 76 65 2e 20 20 4d | 6f 72 65 6f 76 65 72 2c |tive. M|oreover,|
|00003100| 20 74 68 65 20 73 63 72 | 65 65 6e 20 63 61 6e 76 | the scr|een canv|
|00003110| 61 73 0a 63 61 6e 6e 6f | 74 20 62 65 20 64 65 6c |as.canno|t be del|
|00003120| 65 74 65 64 20 77 69 74 | 68 20 74 68 69 73 20 72 |eted wit|h this r|
|00003130| 6f 75 74 69 6e 65 2e 20 | 20 0a 0a 0a 5c 6e 65 78 |outine. | ...\nex|
|00003140| 74 73 79 6e 6f 70 73 69 | 73 0a 76 6f 69 64 20 53 |tsynopsi|s.void S|
|00003150| 52 47 50 5f 75 73 65 43 | 61 6e 76 61 73 20 28 63 |RGP_useC|anvas (c|
|00003160| 61 6e 76 61 73 49 44 29 | 3b 0a 5c 65 6e 64 73 79 |anvasID)|;.\endsy|
|00003170| 6e 6f 70 73 69 73 0a 54 | 68 65 20 73 70 65 63 69 |nopsis.T|he speci|
|00003180| 66 69 65 64 20 63 61 6e | 76 61 73 20 62 65 63 6f |fied can|vas beco|
|00003190| 6d 65 73 20 61 63 74 69 | 76 65 2e 20 20 50 72 69 |mes acti|ve. Pri|
|000031a0| 6d 69 74 69 76 65 73 20 | 63 72 65 61 74 65 64 20 |mitives |created |
|000031b0| 73 75 62 73 65 71 75 65 | 6e 74 6c 79 20 61 72 65 |subseque|ntly are|
|000031c0| 20 64 72 61 77 6e 0a 69 | 6e 20 74 68 69 73 20 63 | drawn.i|n this c|
|000031d0| 61 6e 76 61 73 2c 20 61 | 6e 64 20 61 74 74 72 69 |anvas, a|nd attri|
|000031e0| 62 75 74 65 73 20 73 65 | 74 20 73 75 62 73 65 71 |butes se|t subseq|
|000031f0| 75 65 6e 74 6c 79 20 6d | 6f 64 69 66 79 20 74 68 |uently m|odify th|
|00003200| 69 73 20 63 61 6e 76 61 | 73 27 20 61 74 74 72 69 |is canva|s' attri|
|00003210| 62 75 74 65 0a 67 72 6f | 75 70 2e 0a 0a 25 25 25 |bute.gro|up...%%%|
|00003220| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003230| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003240| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003250| 25 25 25 25 25 25 25 25 | 25 25 25 0a 0a 5c 6d 61 |%%%%%%%%|%%%..\ma|
|00003260| 6a 6f 72 73 65 63 74 7b | 33 7d 7b 4f 75 74 70 75 |jorsect{|3}{Outpu|
|00003270| 74 7d 0a 0a 0a 5c 6d 69 | 6e 6f 72 73 65 63 74 7b |t}...\mi|norsect{|
|00003280| 33 2e 31 7d 7b 63 6f 6c | 6f 72 7d 0a 53 52 47 50 |3.1}{col|or}.SRGP|
|00003290| 20 6d 61 69 6e 74 61 69 | 6e 73 20 61 20 6c 6f 6f | maintai|ns a loo|
|000032a0| 6b 75 70 20 74 61 62 6c | 65 20 28 4c 55 54 29 20 |kup tabl|e (LUT) |
|000032b0| 74 68 61 74 20 6d 61 70 | 73 20 5c 69 74 69 74 7b |that map|s \itit{|
|000032c0| 63 6f 6c 6f 72 20 69 6e | 64 69 63 65 73 7d 20 28 |color in|dices} (|
|000032d0| 77 68 69 63 68 20 61 72 | 65 0a 69 6e 74 65 67 65 |which ar|e.intege|
|000032e0| 72 73 2c 20 75 73 65 64 | 20 74 6f 20 69 6e 64 65 |rs, used| to inde|
|000032f0| 78 20 69 6e 74 6f 20 74 | 68 65 20 4c 55 54 29 20 |x into t|he LUT) |
|00003300| 74 6f 20 61 63 74 75 61 | 6c 20 63 6f 6c 6f 72 73 |to actua|l colors|
|00003310| 2e 20 20 54 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |. The n|umber of|
|00003320| 20 65 6e 74 72 69 65 73 | 0a 61 76 61 69 6c 61 62 | entries|.availab|
|00003330| 6c 65 20 69 6e 20 74 68 | 65 20 6c 6f 6f 6b 75 70 |le in th|e lookup|
|00003340| 20 74 61 62 6c 65 20 69 | 73 20 62 61 73 65 64 20 | table i|s based |
|00003350| 6f 6e 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |on the n|umber of|
|00003360| 20 70 6c 61 6e 65 73 20 | 61 6c 6c 6f 63 61 74 65 | planes |allocate|
|00003370| 64 20 66 6f 72 0a 74 68 | 65 20 61 70 70 6c 69 63 |d for.th|e applic|
|00003380| 61 74 69 6f 6e 27 73 20 | 75 73 65 20 28 76 69 61 |ation's |use (via|
|00003390| 20 74 68 65 20 66 6f 75 | 72 74 68 20 70 61 72 61 | the fou|rth para|
|000033a0| 6d 65 74 65 72 20 74 6f | 20 5c 74 74 69 74 7b 53 |meter to| \ttit{S|
|000033b0| 52 47 50 5c 5f 62 65 67 | 69 6e 7d 29 2e 20 20 54 |RGP\_beg|in}). T|
|000033c0| 68 65 0a 6e 75 6d 62 65 | 72 20 6f 66 20 70 6c 61 |he.numbe|r of pla|
|000033d0| 6e 65 73 20 61 76 61 69 | 6c 61 62 6c 65 20 63 61 |nes avai|lable ca|
|000033e0| 6e 20 62 65 20 69 6e 71 | 75 69 72 65 64 20 76 69 |n be inq|uired vi|
|000033f0| 61 3a 0a 0a 5c 62 65 67 | 69 6e 63 6f 64 65 0a 69 |a:..\beg|incode.i|
|00003400| 6e 74 20 53 52 47 50 5f | 69 6e 71 75 69 72 65 43 |nt SRGP_|inquireC|
|00003410| 61 6e 76 61 73 44 65 70 | 74 68 20 28 76 6f 69 64 |anvasDep|th (void|
|00003420| 29 3b 0a 5c 65 6e 64 63 | 6f 64 65 0a 0a 5c 6e 65 |);.\endc|ode..\ne|
|00003430| 77 70 61 72 0a 54 68 65 | 20 6c 65 67 61 6c 20 63 |wpar.The| legal c|
|00003440| 6f 6c 6f 72 20 69 6e 64 | 69 63 65 73 20 61 72 65 |olor ind|ices are|
|00003450| 20 6e 75 6d 62 65 72 73 | 20 62 65 74 77 65 65 6e | numbers| between|
|00003460| 20 28 69 6e 63 6c 75 73 | 69 76 65 29 20 30 20 61 | (inclus|ive) 0 a|
|00003470| 6e 64 0a 24 32 5e 7b 63 | 61 6e 76 61 73 64 65 70 |nd.$2^{c|anvasdep|
|00003480| 74 68 7d 2d 31 24 2e 20 | 20 54 68 65 20 75 73 65 |th}-1$. | The use|
|00003490| 20 6f 66 20 63 6f 6c 6f | 72 20 69 6e 64 69 63 65 | of colo|r indice|
|000034a0| 73 20 6f 75 74 73 69 64 | 65 20 74 68 61 74 20 72 |s outsid|e that r|
|000034b0| 61 6e 67 65 20 61 72 65 | 20 63 6c 61 6d 70 65 64 |ange are| clamped|
|000034c0| 0a 74 6f 20 24 32 5e 7b | 63 61 6e 76 61 73 64 65 |.to $2^{|canvasde|
|000034d0| 70 74 68 7d 2d 31 24 2e | 0a 41 6c 6c 20 69 6d 70 |pth}-1$.|.All imp|
|000034e0| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 73 20 73 75 70 |lementat|ions sup|
|000034f0| 70 6f 72 74 20 74 77 6f | 20 63 6f 6c 6f 72 73 20 |port two| colors |
|00003500| 74 68 61 74 20 6d 61 79 | 20 62 65 20 72 65 66 65 |that may| be refe|
|00003510| 72 65 6e 63 65 64 20 75 | 73 69 6e 67 20 6e 61 6d |renced u|sing nam|
|00003520| 65 73 0a 69 6e 73 74 65 | 61 64 20 6f 66 20 6e 75 |es.inste|ad of nu|
|00003530| 6d 62 65 72 73 3a 20 5c | 74 74 69 74 7b 53 52 47 |mbers: \|ttit{SRG|
|00003540| 50 5c 5f 57 48 49 54 45 | 7d 20 61 6e 64 20 5c 74 |P\_WHITE|} and \t|
|00003550| 74 69 74 7b 53 52 47 50 | 5c 5f 42 4c 41 43 4b 7d |tit{SRGP|\_BLACK}|
|00003560| 2e 0a 0a 5c 69 66 4d 61 | 63 7b 5c 6e 65 77 70 61 |...\ifMa|c{\newpa|
|00003570| 72 20 5c 62 6f 6c 64 69 | 74 7b 4d 61 63 69 6e 74 |r \boldi|t{Macint|
|00003580| 6f 73 68 20 75 73 65 72 | 73 3a 20 20 53 65 65 20 |osh user|s: See |
|00003590| 73 65 63 74 69 6f 6e 20 | 30 20 66 6f 72 20 61 20 |section |0 for a |
|000035a0| 76 65 72 79 20 69 6d 70 | 6f 72 74 61 6e 74 20 6e |very imp|ortant n|
|000035b0| 6f 74 65 20 6f 6e 0a 72 | 65 73 74 72 69 63 74 69 |ote on.r|estricti|
|000035c0| 6f 6e 73 20 69 6e 68 65 | 72 65 6e 74 20 69 6e 20 |ons inhe|rent in |
|000035d0| 74 68 65 20 43 6f 6c 6f | 72 20 51 75 69 63 6b 64 |the Colo|r Quickd|
|000035e0| 72 61 77 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 53 |raw vers|ion of S|
|000035f0| 52 47 50 21 7d 7d 0a 0a | 5c 6e 65 77 70 61 72 0a |RGP!}}..|\newpar.|
|00003600| 4f 6e 20 63 6f 6c 6f 72 | 20 6e 6f 64 65 73 2c 20 |On color| nodes, |
|00003610| 5c 74 74 69 74 7b 53 52 | 47 50 5c 5f 57 48 49 54 |\ttit{SR|GP\_WHIT|
|00003620| 45 7d 20 69 73 20 30 20 | 61 6e 64 20 5c 74 74 69 |E} is 0 |and \tti|
|00003630| 74 7b 53 52 47 50 5c 5f | 42 4c 41 43 4b 7d 20 69 |t{SRGP\_|BLACK} i|
|00003640| 73 20 31 2c 20 61 6e 64 | 20 74 68 65 79 0a 61 72 |s 1, and| they.ar|
|00003650| 65 20 74 68 65 20 6f 6e | 6c 79 20 69 6e 69 74 69 |e the on|ly initi|
|00003660| 61 6c 69 7a 65 64 20 65 | 6e 74 72 69 65 73 20 69 |alized e|ntries i|
|00003670| 6e 20 74 68 65 20 4c 55 | 54 2e 20 20 4f 6e 65 20 |n the LU|T. One |
|00003680| 73 68 6f 75 6c 64 20 6e | 6f 74 65 2c 20 68 6f 77 |should n|ote, how|
|00003690| 65 76 65 72 2c 20 74 68 | 61 74 20 69 66 0a 74 68 |ever, th|at if.th|
|000036a0| 65 20 66 69 72 73 74 20 | 74 77 6f 20 65 6e 74 72 |e first |two entr|
|000036b0| 69 65 73 20 6f 66 20 74 | 68 65 20 4c 55 54 20 61 |ies of t|he LUT a|
|000036c0| 72 65 20 63 68 61 6e 67 | 65 64 20 62 79 20 74 68 |re chang|ed by th|
|000036d0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 2c 20 74 |e applic|ation, t|
|000036e0| 68 65 20 6e 61 6d 65 73 | 0a 28 53 52 47 50 5c 5f |he names|.(SRGP\_|
|000036f0| 42 4c 41 43 4b 20 61 6e | 64 20 53 52 47 50 5c 5f |BLACK an|d SRGP\_|
|00003700| 57 48 49 54 45 29 20 61 | 72 65 20 6e 6f 20 6c 6f |WHITE) a|re no lo|
|00003710| 6e 67 65 72 20 6d 65 61 | 6e 69 6e 67 66 75 6c 2e |nger mea|ningful.|
|00003720| 0a 0a 5c 6e 65 77 70 61 | 72 0a 4f 6e 20 6d 6f 6e |..\newpa|r.On mon|
|00003730| 6f 63 68 72 6f 6d 65 20 | 64 69 73 70 6c 61 79 73 |ochrome |displays|
|00003740| 2c 20 74 68 65 20 74 77 | 6f 20 73 79 6d 62 6f 6c |, the tw|o symbol|
|00003750| 73 20 5c 74 74 69 74 7b | 53 52 47 50 5c 5f 42 4c |s \ttit{|SRGP\_BL|
|00003760| 41 43 4b 7d 20 61 6e 64 | 20 0a 5c 74 74 69 74 7b |ACK} and| .\ttit{|
|00003770| 53 52 47 50 5c 5f 57 48 | 49 54 45 7d 20 61 72 65 |SRGP\_WH|ITE} are|
|00003780| 0a 69 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 2d |.impleme|ntation-|
|00003790| 64 65 70 65 6e 64 65 6e | 74 20 63 6f 6e 73 74 61 |dependen|t consta|
|000037a0| 6e 74 73 2e 20 20 4d 6f | 72 65 6f 76 65 72 2c 20 |nts. Mo|reover, |
|000037b0| 74 68 65 20 75 73 65 20 | 6f 66 20 61 20 63 6f 6c |the use |of a col|
|000037c0| 6f 72 20 69 6e 64 65 78 | 20 67 72 65 61 74 65 72 |or index| greater|
|000037d0| 0a 74 68 61 6e 20 31 20 | 69 73 20 63 6c 61 6d 70 |.than 1 |is clamp|
|000037e0| 65 64 20 74 6f 20 31 20 | 6f 6e 20 61 20 6d 6f 6e |ed to 1 |on a mon|
|000037f0| 6f 63 68 72 6f 6d 65 20 | 64 69 73 70 6c 61 79 2e |ochrome |display.|
|00003800| 0a 0a 5c 6e 65 77 70 61 | 72 0a 41 6e 20 61 70 70 |..\newpa|r.An app|
|00003810| 6c 69 63 61 74 69 6f 6e | 20 6d 61 79 20 6c 6f 61 |lication| may loa|
|00003820| 64 20 61 20 63 6f 6e 74 | 69 67 75 6f 75 73 20 70 |d a cont|iguous p|
|00003830| 6f 72 74 69 6f 6e 20 6f | 66 20 74 68 65 20 4c 55 |ortion o|f the LU|
|00003840| 54 20 62 79 20 63 72 65 | 61 74 69 6e 67 20 74 68 |T by cre|ating th|
|00003850| 72 65 65 0a 61 72 72 61 | 79 73 20 28 6f 6e 65 20 |ree.arra|ys (one |
|00003860| 66 6f 72 20 72 65 64 2c | 20 6f 6e 65 20 66 6f 72 |for red,| one for|
|00003870| 20 62 6c 75 65 2c 20 6f | 6e 65 20 66 6f 72 20 67 | blue, o|ne for g|
|00003880| 72 65 65 6e 29 20 6f 66 | 20 5c 69 74 69 74 7b 69 |reen) of| \itit{i|
|00003890| 6e 74 65 6e 73 69 74 79 | 20 76 61 6c 75 65 73 7d |ntensity| values}|
|000038a0| 2c 0a 65 61 63 68 20 76 | 61 6c 75 65 20 62 65 69 |,.each v|alue bei|
|000038b0| 6e 67 20 61 6e 20 75 6e | 73 69 67 6e 65 64 20 31 |ng an un|signed 1|
|000038c0| 36 2d 62 69 74 20 69 6e | 74 65 67 65 72 2e 20 20 |6-bit in|teger. |
|000038d0| 49 6e 74 65 6e 73 69 74 | 79 20 76 61 6c 75 65 20 |Intensit|y value |
|000038e0| 30 20 72 65 70 72 65 73 | 65 6e 74 73 20 74 68 61 |0 repres|ents tha|
|000038f0| 74 0a 70 72 69 6d 61 72 | 79 27 73 20 6e 6f 74 20 |t.primar|y's not |
|00003900| 63 6f 6e 74 72 69 62 75 | 74 69 6e 67 20 61 74 20 |contribu|ting at |
|00003910| 61 6c 6c 20 74 6f 20 74 | 68 65 20 61 63 74 75 61 |all to t|he actua|
|00003920| 6c 20 63 6f 6c 6f 72 2c | 20 61 6e 64 20 24 32 5e |l color,| and $2^|
|00003930| 7b 31 36 7d 2d 31 24 20 | 28 36 35 2c 35 33 35 29 |{16}-1$ |(65,535)|
|00003940| 0a 72 65 70 72 65 73 65 | 6e 74 73 20 74 68 61 74 |.represe|nts that|
|00003950| 20 70 72 69 6d 61 72 79 | 20 63 6f 6e 74 72 69 62 | primary| contrib|
|00003960| 75 74 69 6e 67 20 69 74 | 73 20 66 75 6c 6c 20 67 |uting it|s full g|
|00003970| 6c 6f 72 79 20 74 6f 20 | 74 68 65 20 61 63 74 75 |lory to |the actu|
|00003980| 61 6c 20 63 6f 6c 6f 72 | 2e 0a 4e 6f 74 65 20 74 |al color|..Note t|
|00003990| 68 61 74 20 74 68 69 73 | 20 6d 65 74 68 6f 64 20 |hat this| method |
|000039a0| 66 6f 72 20 73 70 65 63 | 69 66 79 69 6e 67 20 63 |for spec|ifying c|
|000039b0| 6f 6c 6f 72 73 20 69 73 | 20 6d 61 63 68 69 6e 65 |olors is| machine|
|000039c0| 2d 69 6e 64 65 70 65 6e | 64 65 6e 74 3b 0a 77 6f |-indepen|dent;.wo|
|000039d0| 72 6b 73 74 61 74 69 6f | 6e 73 20 73 75 70 70 6f |rkstatio|ns suppo|
|000039e0| 72 74 69 6e 67 20 6f 6e | 6c 79 20 24 43 24 20 62 |rting on|ly $C$ b|
|000039f0| 69 74 73 20 70 65 72 20 | 69 6e 74 65 6e 73 69 74 |its per |intensit|
|00003a00| 79 20 76 61 6c 75 65 20 | 77 69 6c 6c 20 69 67 6e |y value |will ign|
|00003a10| 6f 72 65 20 61 6c 6c 20 | 62 75 74 0a 74 68 65 20 |ore all |but.the |
|00003a20| 24 43 24 20 6d 6f 73 74 | 20 73 69 67 6e 69 66 69 |$C$ most| signifi|
|00003a30| 63 61 6e 74 20 62 69 74 | 73 20 6f 66 20 65 61 63 |cant bit|s of eac|
|00003a40| 68 20 69 6e 74 65 6e 73 | 69 74 79 20 76 61 6c 75 |h intens|ity valu|
|00003a50| 65 2e 0a 0a 5c 6e 65 77 | 70 61 72 0a 54 6f 20 6c |e...\new|par.To l|
|00003a60| 6f 61 64 20 5c 74 74 69 | 74 7b 63 6f 75 6e 74 7d |oad \tti|t{count}|
|00003a70| 20 65 6e 74 72 69 65 73 | 20 6f 66 20 74 68 65 20 | entries| of the |
|00003a80| 4c 55 54 2c 20 73 74 61 | 72 74 69 6e 67 20 77 69 |LUT, sta|rting wi|
|00003a90| 74 68 20 65 6e 74 72 79 | 0a 5c 74 74 69 74 7b 73 |th entry|.\ttit{s|
|00003aa0| 74 61 72 74 7d 2c 20 63 | 72 65 61 74 65 20 74 68 |tart}, c|reate th|
|00003ab0| 65 20 74 68 72 65 65 20 | 69 6e 74 65 6e 73 69 74 |e three |intensit|
|00003ac0| 79 20 76 61 6c 75 65 20 | 61 72 72 61 79 73 20 61 |y value |arrays a|
|00003ad0| 6e 64 20 74 68 65 6e 20 | 63 61 6c 6c 3a 0a 0a 5c |nd then |call:..\|
|00003ae0| 62 65 67 69 6e 63 6f 64 | 65 0a 74 79 70 65 64 65 |begincod|e.typede|
|00003af0| 66 20 75 6e 73 69 67 6e | 65 64 20 73 68 6f 72 74 |f unsign|ed short|
|00003b00| 20 75 73 68 3b 0a 76 6f | 69 64 20 53 52 47 50 5f | ush;.vo|id SRGP_|
|00003b10| 6c 6f 61 64 43 6f 6c 6f | 72 54 61 62 6c 65 20 28 |loadColo|rTable (|
|00003b20| 69 6e 74 20 73 74 61 72 | 74 2c 20 69 6e 74 20 63 |int star|t, int c|
|00003b30| 6f 75 6e 74 2c 20 75 73 | 68 20 2a 72 2c 20 75 73 |ount, us|h *r, us|
|00003b40| 68 20 2a 67 2c 20 75 73 | 68 20 2a 62 29 3b 0a 5c |h *g, us|h *b);.\|
|00003b50| 65 6e 64 63 6f 64 65 0a | 0a 5c 6e 65 77 70 61 72 |endcode.|.\newpar|
|00003b60| 0a 41 6e 20 65 61 73 79 | 20 77 61 79 20 74 6f 20 |.An easy| way to |
|00003b70| 73 74 6f 72 65 20 60 60 | 63 6f 6d 6d 6f 6e 27 27 |store ``|common''|
|00003b80| 20 63 6f 6c 6f 72 73 20 | 69 73 20 70 72 6f 76 69 | colors |is provi|
|00003b90| 64 65 64 20 62 79 20 53 | 52 47 50 2e 20 20 43 6f |ded by S|RGP. Co|
|00003ba0| 6d 6d 6f 6e 20 63 6f 6c | 6f 72 73 20 61 72 65 0a |mmon col|ors are.|
|00003bb0| 74 68 6f 73 65 20 63 6f | 6c 6f 72 73 20 77 68 69 |those co|lors whi|
|00003bc0| 63 68 20 68 61 76 65 20 | 62 65 65 6e 20 67 69 76 |ch have |been giv|
|00003bd0| 65 6e 20 6e 61 6d 65 73 | 20 28 6c 69 6b 65 20 60 |en names| (like `|
|00003be0| 60 50 75 72 70 6c 65 27 | 27 2c 0a 60 60 4d 65 64 |`Purple'|',.``Med|
|00003bf0| 69 75 6d 46 6f 72 65 73 | 74 47 72 65 65 6e 27 27 |iumFores|tGreen''|
|00003c00| 2c 20 61 6e 64 20 60 60 | 4f 72 61 6e 67 65 27 27 |, and ``|Orange''|
|00003c10| 29 20 5c 69 66 58 31 31 | 7b 62 79 20 74 68 65 20 |) \ifX11|{by the |
|00003c20| 58 31 31 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |X11 impl|ementati|
|00003c30| 6f 6e 2e 20 20 41 0a 63 | 6f 6d 70 6c 65 74 65 20 |on. A.c|omplete |
|00003c40| 6c 69 73 74 20 6f 66 20 | 74 68 65 20 73 75 70 70 |list of |the supp|
|00003c50| 6f 72 74 65 64 20 63 6f | 6c 6f 72 73 20 69 73 20 |orted co|lors is |
|00003c60| 75 73 75 61 6c 6c 79 20 | 66 6f 75 6e 64 20 69 6e |usually |found in|
|00003c70| 0a 5c 63 6d 64 7b 2f 75 | 73 72 2f 6c 69 62 2f 58 |.\cmd{/u|sr/lib/X|
|00003c80| 31 31 2f 72 67 62 2e 74 | 78 74 7d 2e 7d 0a 5c 69 |11/rgb.t|xt}.}.\i|
|00003c90| 66 4d 61 63 7b 69 6e 20 | 74 68 65 20 53 52 47 50 |fMac{in |the SRGP|
|00003ca0| 20 72 65 73 6f 75 72 63 | 65 20 66 69 6c 65 2e 20 | resourc|e file. |
|00003cb0| 20 41 20 63 6f 6d 70 6c | 65 74 65 20 6c 69 73 74 | A compl|ete list|
|00003cc0| 20 6f 66 20 74 68 65 20 | 73 75 70 70 6f 72 74 65 | of the |supporte|
|00003cd0| 64 20 63 6f 6c 6f 72 73 | 20 69 73 0a 70 72 6f 76 |d colors| is.prov|
|00003ce0| 69 64 65 64 20 62 65 6c | 6f 77 2e 7d 20 20 53 52 |ided bel|ow.} SR|
|00003cf0| 47 50 20 73 75 70 70 6f | 72 74 73 20 6f 6e 6c 79 |GP suppo|rts only|
|00003d00| 20 74 68 65 20 73 65 74 | 74 69 6e 67 20 6f 66 20 | the set|ting of |
|00003d10| 6f 6e 65 0a 4c 55 54 20 | 65 6e 74 72 79 20 61 74 |one.LUT |entry at|
|00003d20| 20 61 20 74 69 6d 65 20 | 77 68 65 6e 20 75 73 69 | a time |when usi|
|00003d30| 6e 67 20 63 6f 6d 6d 6f | 6e 20 63 6f 6c 6f 72 73 |ng commo|n colors|
|00003d40| 3a 0a 0a 5c 62 65 67 69 | 6e 63 6f 64 65 0a 76 6f |:..\begi|ncode.vo|
|00003d50| 69 64 20 53 52 47 50 5f | 6c 6f 61 64 43 6f 6d 6d |id SRGP_|loadComm|
|00003d60| 6f 6e 43 6f 6c 6f 72 20 | 28 69 6e 74 20 65 6e 74 |onColor |(int ent|
|00003d70| 72 79 2c 20 63 68 61 72 | 20 2a 63 6f 6c 6f 72 6e |ry, char| *colorn|
|00003d80| 61 6d 65 29 0a 5c 65 6e | 64 63 6f 64 65 0a 0a 5c |ame).\en|dcode..\|
|00003d90| 69 66 4d 61 63 7b 5c 6e | 65 77 70 61 72 7d 0a 5c |ifMac{\n|ewpar}.\|
|00003da0| 69 66 4d 61 63 7b 54 68 | 65 20 73 75 70 70 6f 72 |ifMac{Th|e suppor|
|00003db0| 74 65 64 20 63 6f 6c 6f | 72 73 20 61 72 65 20 73 |ted colo|rs are s|
|00003dc0| 68 6f 77 6e 20 69 6e 20 | 74 68 65 69 72 20 6c 6f |hown in |their lo|
|00003dd0| 77 65 72 2d 63 61 73 65 | 20 63 6f 6d 70 72 65 73 |wer-case| compres|
|00003de0| 73 65 64 20 66 6f 72 6d | 73 0a 62 65 6c 6f 77 2e |sed form|s.below.|
|00003df0| 20 20 42 65 20 61 77 61 | 72 65 20 74 68 61 74 20 | Be awa|re that |
|00003e00| 79 6f 75 20 63 61 6e 20 | 69 6e 73 65 72 74 20 73 |you can |insert s|
|00003e10| 70 61 63 65 73 2c 20 61 | 6e 64 20 75 73 65 20 75 |paces, a|nd use u|
|00003e20| 70 70 65 72 2d 63 61 73 | 65 0a 61 72 62 69 74 72 |pper-cas|e.arbitr|
|00003e30| 61 72 69 6c 79 2c 20 69 | 6e 20 74 68 65 20 73 74 |arily, i|n the st|
|00003e40| 72 69 6e 67 20 79 6f 75 | 20 68 61 6e 64 20 74 6f |ring you| hand to|
|00003e50| 20 53 52 47 50 5c 5f 6c | 6f 61 64 43 6f 6d 6d 6f | SRGP\_l|oadCommo|
|00003e60| 6e 43 6f 6c 6f 72 2e 7d | 0a 5c 69 66 4d 61 63 7b |nColor.}|.\ifMac{|
|00003e70| 5c 62 65 67 69 6e 74 69 | 6e 79 63 6f 64 65 7d 0a |\beginti|nycode}.|
|00003e80| 5c 69 66 4d 61 63 7b 61 | 6c 69 63 65 62 6c 75 65 |\ifMac{a|liceblue|
|00003e90| 20 20 20 20 20 20 20 20 | 20 67 72 65 65 6e 79 65 | | greenye|
|00003ea0| 6c 6c 6f 77 20 20 20 20 | 20 20 20 20 20 20 20 20 |llow | |
|00003eb0| 20 6e 61 76 79 62 6c 75 | 65 0a 61 6e 74 69 71 75 | navyblu|e.antiqu|
|00003ec0| 65 77 68 69 74 65 20 20 | 20 20 20 20 67 72 65 79 |ewhite | grey|
|00003ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ee0| 20 20 20 20 6f 6c 64 6c | 61 63 65 0a 61 71 75 61 | oldl|ace.aqua|
|00003ef0| 6d 61 72 69 6e 65 20 20 | 20 20 20 20 20 20 68 6f |marine | ho|
|00003f00| 6e 65 79 64 65 77 20 20 | 20 20 20 20 20 20 20 20 |neydew | |
|00003f10| 20 20 20 20 20 20 6f 6c | 69 76 65 64 72 61 62 0a | ol|ivedrab.|
|00003f20| 61 7a 75 72 65 20 20 20 | 20 20 20 20 20 20 20 20 |azure | |
|00003f30| 20 20 68 6f 74 70 69 6e | 6b 20 20 20 20 20 20 20 | hotpin|k |
|00003f40| 20 20 20 20 20 20 20 20 | 20 20 6f 72 61 6e 67 65 | | orange|
|00003f50| 0a 62 65 69 67 65 20 20 | 20 20 20 20 20 20 20 20 |.beige | |
|00003f60| 20 20 20 69 6e 64 69 61 | 6e 72 65 64 20 20 20 20 | india|nred |
|00003f70| 20 20 20 20 20 20 20 20 | 20 20 20 6f 72 61 6e 67 | | orang|
|00003f80| 65 72 65 64 0a 62 69 73 | 71 75 65 20 20 20 20 20 |ered.bis|que |
|00003f90| 20 20 20 20 20 20 20 69 | 76 6f 72 79 20 20 20 20 | i|vory |
|00003fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6f | | o|
|00003fb0| 72 63 68 69 64 0a 62 6c | 61 63 6b 20 20 20 20 20 |rchid.bl|ack |
|00003fc0| 20 20 20 20 20 20 20 20 | 6b 68 61 6b 69 20 20 20 | |khaki |
|00003fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fe0| 70 61 6c 65 67 6f 6c 64 | 65 6e 72 6f 64 0a 62 6c |palegold|enrod.bl|
|00003ff0| 61 6e 63 68 65 64 61 6c | 6d 6f 6e 64 20 20 20 20 |anchedal|mond |
|00004000| 6c 61 76 65 6e 64 65 72 | 20 20 20 20 20 20 20 20 |lavender| |
|00004010| 20 20 20 20 20 20 20 20 | 70 61 6c 65 67 72 65 65 | |palegree|
|00004020| 6e 0a 62 6c 75 65 20 20 | 20 20 20 20 20 20 20 20 |n.blue | |
|00004030| 20 20 20 20 6c 61 76 65 | 6e 64 65 72 62 6c 75 73 | lave|nderblus|
|00004040| 68 20 20 20 20 20 20 20 | 20 20 20 20 70 61 6c 65 |h | pale|
|00004050| 74 75 72 71 75 6f 69 73 | 65 0a 62 6c 75 65 76 69 |turquois|e.bluevi|
|00004060| 6f 6c 65 74 20 20 20 20 | 20 20 20 20 6c 61 77 6e |olet | lawn|
|00004070| 67 72 65 65 6e 20 20 20 | 20 20 20 20 20 20 20 20 |green | |
|00004080| 20 20 20 20 70 61 6c 65 | 76 69 6f 6c 65 74 72 65 | pale|violetre|
|00004090| 64 0a 62 72 6f 77 6e 20 | 20 20 20 20 20 20 20 20 |d.brown | |
|000040a0| 20 20 20 20 6c 65 6d 6f | 6e 63 68 69 66 66 6f 6e | lemo|nchiffon|
|000040b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 70 61 70 61 | | papa|
|000040c0| 79 61 77 68 69 70 0a 62 | 75 72 6c 79 77 6f 6f 64 |yawhip.b|urlywood|
|000040d0| 20 20 20 20 20 20 20 20 | 20 6c 69 67 68 74 62 6c | | lightbl|
|000040e0| 75 65 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ue | |
|000040f0| 20 70 65 61 63 68 70 75 | 66 66 0a 63 61 64 65 74 | peachpu|ff.cadet|
|00004100| 62 6c 75 65 20 20 20 20 | 20 20 20 20 20 6c 69 67 |blue | lig|
|00004110| 68 74 63 6f 72 61 6c 20 | 20 20 20 20 20 20 20 20 |htcoral | |
|00004120| 20 20 20 20 20 70 65 72 | 75 0a 63 68 61 72 74 72 | per|u.chartr|
|00004130| 65 75 73 65 20 20 20 20 | 20 20 20 20 6c 69 67 68 |euse | ligh|
|00004140| 74 63 79 61 6e 20 20 20 | 20 20 20 20 20 20 20 20 |tcyan | |
|00004150| 20 20 20 20 70 69 6e 6b | 0a 63 68 6f 63 6f 6c 61 | pink|.chocola|
|00004160| 74 65 20 20 20 20 20 20 | 20 20 20 6c 69 67 68 74 |te | light|
|00004170| 67 6f 6c 64 65 6e 72 6f | 64 20 20 20 20 20 20 20 |goldenro|d |
|00004180| 20 20 20 70 6c 75 6d 0a | 63 6f 72 61 6c 20 20 20 | plum.|coral |
|00004190| 20 20 20 20 20 20 20 20 | 20 20 6c 69 67 68 74 67 | | lightg|
|000041a0| 6f 6c 64 65 6e 72 6f 64 | 79 65 6c 6c 6f 77 20 20 |oldenrod|yellow |
|000041b0| 20 20 70 6f 77 64 65 72 | 62 6c 75 65 0a 63 6f 72 | powder|blue.cor|
|000041c0| 6e 66 6c 6f 77 65 72 62 | 6c 75 65 20 20 20 20 6c |nflowerb|lue l|
|000041d0| 69 67 68 74 67 72 61 79 | 20 20 20 20 20 20 20 20 |ightgray| |
|000041e0| 20 20 20 20 20 20 20 70 | 75 72 70 6c 65 0a 63 6f | p|urple.co|
|000041f0| 72 6e 73 69 6c 6b 20 20 | 20 20 20 20 20 20 20 20 |rnsilk | |
|00004200| 6c 69 67 68 74 67 72 65 | 79 20 20 20 20 20 20 20 |lightgre|y |
|00004210| 20 20 20 20 20 20 20 20 | 72 65 64 0a 63 79 61 6e | |red.cyan|
|00004220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6c 69 | | li|
|00004230| 67 68 74 70 69 6e 6b 20 | 20 20 20 20 20 20 20 20 |ghtpink | |
|00004240| 20 20 20 20 20 20 72 6f | 73 79 62 72 6f 77 6e 0a | ro|sybrown.|
|00004250| 64 61 72 6b 67 6f 6c 64 | 65 6e 72 6f 64 20 20 20 |darkgold|enrod |
|00004260| 20 20 6c 69 67 68 74 73 | 61 6c 6d 6f 6e 20 20 20 | lights|almon |
|00004270| 20 20 20 20 20 20 20 20 | 20 20 72 6f 79 61 6c 62 | | royalb|
|00004280| 6c 75 65 0a 64 61 72 6b | 67 72 65 65 6e 20 20 20 |lue.dark|green |
|00004290| 20 20 20 20 20 20 6c 69 | 67 68 74 73 65 61 67 72 | li|ghtseagr|
|000042a0| 65 65 6e 20 20 20 20 20 | 20 20 20 20 20 20 73 61 |een | sa|
|000042b0| 64 64 6c 65 62 72 6f 77 | 6e 0a 64 61 72 6b 6b 68 |ddlebrow|n.darkkh|
|000042c0| 61 6b 69 20 20 20 20 20 | 20 20 20 20 6c 69 67 68 |aki | ligh|
|000042d0| 74 73 6b 79 62 6c 75 65 | 20 20 20 20 20 20 20 20 |tskyblue| |
|000042e0| 20 20 20 20 73 61 6c 6d | 6f 6e 0a 64 61 72 6b 6f | salm|on.darko|
|000042f0| 6c 69 76 65 67 72 65 65 | 6e 20 20 20 20 6c 69 67 |livegree|n lig|
|00004300| 68 74 73 6c 61 74 65 62 | 6c 75 65 20 20 20 20 20 |htslateb|lue |
|00004310| 20 20 20 20 20 73 61 6e | 64 79 62 72 6f 77 6e 0a | san|dybrown.|
|00004320| 64 61 72 6b 6f 72 61 6e | 67 65 20 20 20 20 20 20 |darkoran|ge |
|00004330| 20 20 6c 69 67 68 74 73 | 6c 61 74 65 67 72 61 79 | lights|lategray|
|00004340| 20 20 20 20 20 20 20 20 | 20 20 73 65 61 67 72 65 | | seagre|
|00004350| 65 6e 0a 64 61 72 6b 6f | 72 63 68 69 64 20 20 20 |en.darko|rchid |
|00004360| 20 20 20 20 20 6c 69 67 | 68 74 73 6c 61 74 65 67 | lig|htslateg|
|00004370| 72 65 79 20 20 20 20 20 | 20 20 20 20 20 73 65 61 |rey | sea|
|00004380| 73 68 65 6c 6c 0a 64 61 | 72 6b 73 61 6c 6d 6f 6e |shell.da|rksalmon|
|00004390| 20 20 20 20 20 20 20 20 | 6c 69 67 68 74 73 74 65 | |lightste|
|000043a0| 65 6c 62 6c 75 65 20 20 | 20 20 20 20 20 20 20 20 |elblue | |
|000043b0| 73 69 65 6e 6e 61 0a 64 | 61 72 6b 73 65 61 67 72 |sienna.d|arkseagr|
|000043c0| 65 65 6e 20 20 20 20 20 | 20 6c 69 67 68 74 79 65 |een | lightye|
|000043d0| 6c 6c 6f 77 20 20 20 20 | 20 20 20 20 20 20 20 20 |llow | |
|000043e0| 20 73 6b 79 62 6c 75 65 | 0a 64 61 72 6b 73 6c 61 | skyblue|.darksla|
|000043f0| 74 65 62 6c 75 65 20 20 | 20 20 20 6c 69 6d 65 67 |teblue | limeg|
|00004400| 72 65 65 6e 20 20 20 20 | 20 20 20 20 20 20 20 20 |reen | |
|00004410| 20 20 20 73 6c 61 74 65 | 62 6c 75 65 0a 64 61 72 | slate|blue.dar|
|00004420| 6b 73 6c 61 74 65 67 72 | 61 79 20 20 20 20 20 6c |kslategr|ay l|
|00004430| 69 6e 65 6e 20 20 20 20 | 20 20 20 20 20 20 20 20 |inen | |
|00004440| 20 20 20 20 20 20 20 73 | 6c 61 74 65 67 72 61 79 | s|lategray|
|00004450| 0a 64 61 72 6b 73 6c 61 | 74 65 67 72 65 79 20 20 |.darksla|tegrey |
|00004460| 20 20 20 6d 61 67 65 6e | 74 61 20 20 20 20 20 20 | magen|ta |
|00004470| 20 20 20 20 20 20 20 20 | 20 20 20 73 6c 61 74 65 | | slate|
|00004480| 67 72 65 79 0a 64 61 72 | 6b 74 75 72 71 75 6f 69 |grey.dar|kturquoi|
|00004490| 73 65 20 20 20 20 20 6d | 61 72 6f 6f 6e 20 20 20 |se m|aroon |
|000044a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 73 | | s|
|000044b0| 6e 6f 77 0a 64 61 72 6b | 76 69 6f 6c 65 74 20 20 |now.dark|violet |
|000044c0| 20 20 20 20 20 20 6d 65 | 64 69 75 6d 61 71 75 61 | me|diumaqua|
|000044d0| 6d 61 72 69 6e 65 20 20 | 20 20 20 20 20 20 73 70 |marine | sp|
|000044e0| 72 69 6e 67 67 72 65 65 | 6e 0a 64 65 65 70 70 69 |ringgree|n.deeppi|
|000044f0| 6e 6b 20 20 20 20 20 20 | 20 20 20 20 6d 65 64 69 |nk | medi|
|00004500| 75 6d 62 6c 75 65 20 20 | 20 20 20 20 20 20 20 20 |umblue | |
|00004510| 20 20 20 20 73 74 65 65 | 6c 62 6c 75 65 0a 64 65 | stee|lblue.de|
|00004520| 65 70 73 6b 79 62 6c 75 | 65 20 20 20 20 20 20 20 |epskyblu|e |
|00004530| 6d 65 64 69 75 6d 6f 72 | 63 68 69 64 20 20 20 20 |mediumor|chid |
|00004540| 20 20 20 20 20 20 20 20 | 74 61 6e 0a 64 69 6d 67 | |tan.dimg|
|00004550| 72 61 79 20 20 20 20 20 | 20 20 20 20 20 20 6d 65 |ray | me|
|00004560| 64 69 75 6d 70 75 72 70 | 6c 65 20 20 20 20 20 20 |diumpurp|le |
|00004570| 20 20 20 20 20 20 74 68 | 69 73 74 6c 65 0a 64 69 | th|istle.di|
|00004580| 6d 67 72 65 79 20 20 20 | 20 20 20 20 20 20 20 20 |mgrey | |
|00004590| 6d 65 64 69 75 6d 73 65 | 61 67 72 65 65 6e 20 20 |mediumse|agreen |
|000045a0| 20 20 20 20 20 20 20 20 | 74 6f 6d 61 74 6f 0a 64 | |tomato.d|
|000045b0| 6f 64 67 65 72 62 6c 75 | 65 20 20 20 20 20 20 20 |odgerblu|e |
|000045c0| 20 6d 65 64 69 75 6d 73 | 6c 61 74 65 62 6c 75 65 | mediums|lateblue|
|000045d0| 20 20 20 20 20 20 20 20 | 20 74 75 72 71 75 6f 69 | | turquoi|
|000045e0| 73 65 0a 66 69 72 65 62 | 72 69 63 6b 20 20 20 20 |se.fireb|rick |
|000045f0| 20 20 20 20 20 6d 65 64 | 69 75 6d 73 70 72 69 6e | med|iumsprin|
|00004600| 67 67 72 65 65 6e 20 20 | 20 20 20 20 20 76 69 6f |ggreen | vio|
|00004610| 6c 65 74 0a 66 6c 6f 72 | 61 6c 77 68 69 74 65 20 |let.flor|alwhite |
|00004620| 20 20 20 20 20 20 6d 65 | 64 69 75 6d 74 75 72 71 | me|diumturq|
|00004630| 75 6f 69 73 65 20 20 20 | 20 20 20 20 20 20 76 69 |uoise | vi|
|00004640| 6f 6c 65 74 72 65 64 0a | 66 6f 72 65 73 74 67 72 |oletred.|forestgr|
|00004650| 65 65 6e 20 20 20 20 20 | 20 20 6d 65 64 69 75 6d |een | medium|
|00004660| 76 69 6f 6c 65 74 72 65 | 64 20 20 20 20 20 20 20 |violetre|d |
|00004670| 20 20 77 68 65 61 74 0a | 67 61 69 6e 73 62 6f 72 | wheat.|gainsbor|
|00004680| 6f 20 20 20 20 20 20 20 | 20 20 6d 69 64 6e 69 67 |o | midnig|
|00004690| 68 74 62 6c 75 65 20 20 | 20 20 20 20 20 20 20 20 |htblue | |
|000046a0| 20 20 77 68 69 74 65 0a | 67 68 6f 73 74 77 68 69 | white.|ghostwhi|
|000046b0| 74 65 20 20 20 20 20 20 | 20 20 6d 69 6e 74 63 72 |te | mintcr|
|000046c0| 65 61 6d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |eam | |
|000046d0| 20 20 77 68 69 74 65 73 | 6d 6f 6b 65 0a 67 6f 6c | whites|moke.gol|
|000046e0| 64 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d |d | m|
|000046f0| 69 73 74 79 72 6f 73 65 | 20 20 20 20 20 20 20 20 |istyrose| |
|00004700| 20 20 20 20 20 20 20 79 | 65 6c 6c 6f 77 0a 67 6f | y|ellow.go|
|00004710| 6c 64 65 6e 72 6f 64 20 | 20 20 20 20 20 20 20 20 |ldenrod | |
|00004720| 6d 6f 63 63 61 73 69 6e | 20 20 20 20 20 20 20 20 |moccasin| |
|00004730| 20 20 20 20 20 20 20 20 | 79 65 6c 6c 6f 77 67 72 | |yellowgr|
|00004740| 65 65 6e 0a 67 72 61 79 | 20 20 20 20 20 20 20 20 |een.gray| |
|00004750| 20 20 20 20 20 20 6e 61 | 76 61 6a 6f 77 68 69 74 | na|vajowhit|
|00004760| 65 20 20 20 0a 67 72 65 | 65 6e 20 20 20 20 20 20 |e .gre|en |
|00004770| 20 20 20 20 20 20 20 6e | 61 76 79 7d 0a 5c 69 66 | n|avy}.\if|
|00004780| 4d 61 63 7b 5c 65 6e 64 | 63 6f 64 65 7d 0a 0a 5c |Mac{\end|code}..\|
|00004790| 69 66 4d 61 63 7b 5c 6e | 65 77 70 61 72 20 57 61 |ifMac{\n|ewpar Wa|
|000047a0| 72 6e 69 6e 67 3a 20 20 | 54 68 65 20 4d 61 63 27 |rning: |The Mac'|
|000047b0| 73 20 63 6f 6c 6f 72 20 | 0a 74 61 62 6c 65 20 63 |s color |.table c|
|000047c0| 61 6e 20 73 6f 6d 65 74 | 69 6d 65 73 20 62 65 20 |an somet|imes be |
|000047d0| 6c 65 66 74 20 69 6e 20 | 61 20 64 69 73 74 75 72 |left in |a distur|
|000047e0| 62 65 64 20 73 74 61 74 | 65 20 77 68 65 6e 20 61 |bed stat|e when a|
|000047f0| 6e 20 53 52 47 50 20 61 | 70 70 6c 69 63 61 74 69 |n SRGP a|pplicati|
|00004800| 6f 6e 0a 65 78 69 74 73 | 20 70 72 65 6d 61 74 75 |on.exits| prematu|
|00004810| 72 65 6c 79 2e 20 20 53 | 65 65 20 73 65 63 74 69 |rely. S|ee secti|
|00004820| 6f 6e 20 39 20 6f 66 20 | 74 68 69 73 20 64 6f 63 |on 9 of |this doc|
|00004830| 75 6d 65 6e 74 20 66 6f | 72 20 6d 6f 72 65 20 69 |ument fo|r more i|
|00004840| 6e 66 6f 72 6d 61 74 69 | 6f 6e 2e 7d 0a 0a 0a 0a |nformati|on.}....|
|00004850| 0a 0a 5c 6d 69 6e 6f 72 | 73 65 63 74 7b 33 2e 32 |..\minor|sect{3.2|
|00004860| 7d 7b 67 65 6f 6d 65 74 | 72 69 63 20 64 61 74 61 |}{geomet|ric data|
|00004870| 20 74 79 70 65 73 7d 0a | 54 68 65 20 66 6f 6c 6c | types}.|The foll|
|00004880| 6f 77 69 6e 67 20 53 52 | 47 50 20 64 61 74 61 20 |owing SR|GP data |
|00004890| 74 79 70 65 73 20 61 6c | 6c 6f 77 20 73 74 6f 72 |types al|low stor|
|000048a0| 61 67 65 20 6f 66 20 67 | 65 6f 6d 65 74 72 69 63 |age of g|eometric|
|000048b0| 20 65 6e 74 69 74 69 65 | 73 3a 0a 0a 5c 62 65 67 | entitie|s:..\beg|
|000048c0| 69 6e 63 6f 64 65 0a 74 | 79 70 65 64 65 66 20 73 |incode.t|ypedef s|
|000048d0| 74 72 75 63 74 20 5c 6c | 62 0a 20 20 20 20 20 20 |truct \l|b. |
|000048e0| 69 6e 74 20 78 2c 20 79 | 3b 0a 5c 72 62 20 70 6f |int x, y|;.\rb po|
|000048f0| 69 6e 74 3b 0a 0a 74 79 | 70 65 64 65 66 20 73 74 |int;..ty|pedef st|
|00004900| 72 75 63 74 20 5c 6c 62 | 0a 20 20 20 20 20 20 70 |ruct \lb|. p|
|00004910| 6f 69 6e 74 20 62 6f 74 | 74 6f 6d 5f 6c 65 66 74 |oint bot|tom_left|
|00004920| 2c 20 74 6f 70 5f 72 69 | 67 68 74 3b 0a 5c 72 62 |, top_ri|ght;.\rb|
|00004930| 20 72 65 63 74 61 6e 67 | 6c 65 3b 0a 5c 65 6e 64 | rectang|le;.\end|
|00004940| 63 6f 64 65 0a 0a 5c 6e | 65 77 70 61 72 0a 49 6e |code..\n|ewpar.In|
|00004950| 73 74 61 6e 63 65 73 20 | 6f 66 20 74 68 65 73 65 |stances |of these|
|00004960| 20 64 61 74 61 20 74 79 | 70 65 73 20 6d 61 79 20 | data ty|pes may |
|00004970| 62 65 20 63 72 65 61 74 | 65 64 20 75 73 69 6e 67 |be creat|ed using|
|00004980| 20 74 68 65 73 65 20 72 | 6f 75 74 69 6e 65 73 3a | these r|outines:|
|00004990| 0a 0a 5c 6e 65 77 73 79 | 6e 6f 70 73 69 73 0a 70 |..\newsy|nopsis.p|
|000049a0| 6f 69 6e 74 20 53 52 47 | 50 5f 64 65 66 50 6f 69 |oint SRG|P_defPoi|
|000049b0| 6e 74 20 28 69 6e 74 20 | 78 2c 20 69 6e 74 20 79 |nt (int |x, int y|
|000049c0| 29 3b 0a 72 65 63 74 61 | 6e 67 6c 65 20 53 52 47 |);.recta|ngle SRG|
|000049d0| 50 5f 64 65 66 52 65 63 | 74 61 6e 67 6c 65 20 28 |P_defRec|tangle (|
|000049e0| 69 6e 74 20 6c 65 66 74 | 5f 78 2c 20 69 6e 74 20 |int left|_x, int |
|000049f0| 62 6f 74 74 6f 6d 5f 79 | 2c 20 69 6e 74 20 72 69 |bottom_y|, int ri|
|00004a00| 67 68 74 5f 78 2c 20 69 | 6e 74 20 74 6f 70 5f 79 |ght_x, i|nt top_y|
|00004a10| 29 3b 0a 5c 65 6e 64 73 | 79 6e 6f 70 73 69 73 0a |);.\ends|ynopsis.|
|00004a20| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a50| 20 20 20 0a 0a 0a 0a 0a | 0a 5c 6d 69 6e 6f 72 73 | .....|.\minors|
|00004a60| 65 63 74 7b 33 2e 33 7d | 7b 63 6f 6e 74 72 6f 6c |ect{3.3}|{control|
|00004a70| 20 6f 66 20 74 68 65 20 | 70 61 74 74 65 72 6e 20 | of the |pattern |
|00004a80| 61 6e 64 20 66 6f 6e 74 | 20 74 61 62 6c 65 73 7d |and font| tables}|
|00004a90| 0a 53 65 76 65 72 61 6c | 20 6f 66 20 74 68 65 20 |.Several| of the |
|00004aa0| 53 52 47 50 20 61 74 74 | 72 69 62 75 74 65 73 20 |SRGP att|ributes |
|00004ab0| 61 72 65 20 70 61 74 74 | 65 72 6e 73 20 74 6f 20 |are patt|erns to |
|00004ac0| 62 65 20 75 73 65 64 20 | 66 6f 72 20 66 69 6c 6c |be used |for fill|
|00004ad0| 69 6e 67 20 61 72 65 61 | 73 20 61 6e 64 0a 66 6f |ing area|s and.fo|
|00004ae0| 72 20 64 72 61 77 69 6e | 67 20 6c 69 6e 65 73 20 |r drawin|g lines |
|00004af0| 61 6e 64 20 66 72 61 6d | 65 73 2e 20 20 54 77 6f |and fram|es. Two|
|00004b00| 20 70 61 74 74 65 72 6e | 20 74 61 62 6c 65 73 20 | pattern| tables |
|00004b10| 61 72 65 20 73 75 70 70 | 6f 72 74 65 64 3a 20 6f |are supp|orted: o|
|00004b20| 6e 65 20 73 74 6f 72 69 | 6e 67 0a 62 69 74 6d 61 |ne stori|ng.bitma|
|00004b30| 70 73 20 61 6e 64 20 6f | 6e 65 20 73 74 6f 72 69 |ps and o|ne stori|
|00004b40| 6e 67 20 70 69 78 6d 61 | 70 73 2e 20 0a 0a 5c 6e |ng pixma|ps. ..\n|
|00004b50| 65 77 70 61 72 0a 54 68 | 65 20 62 69 74 6d 61 70 |ewpar.Th|e bitmap|
|00004b60| 20 70 61 74 74 65 72 6e | 20 74 61 62 6c 65 20 69 | pattern| table i|
|00004b70| 73 20 69 6e 69 74 69 61 | 6c 69 7a 65 64 20 69 6e |s initia|lized in|
|00004b80| 20 74 68 69 73 20 77 61 | 79 3a 20 50 61 74 74 65 | this wa|y: Patte|
|00004b90| 72 6e 20 30 20 69 73 20 | 61 6c 6c 0a 62 61 63 6b |rn 0 is |all.back|
|00004ba0| 67 72 6f 75 6e 64 2c 20 | 61 6e 64 20 70 61 74 74 |ground, |and patt|
|00004bb0| 65 72 6e 20 31 20 69 73 | 20 61 6c 6c 20 66 6f 72 |ern 1 is| all for|
|00004bc0| 65 67 72 6f 75 6e 64 2e | 20 20 50 61 74 74 65 72 |eground.| Patter|
|00004bd0| 6e 73 20 31 20 74 68 72 | 6f 75 67 68 20 33 38 20 |ns 1 thr|ough 38 |
|00004be0| 61 72 65 20 74 68 65 0a | 73 74 61 6e 64 61 72 64 |are the.|standard|
|00004bf0| 20 4d 61 63 69 6e 74 6f | 73 68 20 70 61 74 74 65 | Macinto|sh patte|
|00004c00| 72 6e 73 20 73 68 6f 77 | 6e 20 69 6e 20 56 6f 6c |rns show|n in Vol|
|00004c10| 75 6d 65 20 31 20 6f 66 | 20 43 68 65 72 6e 69 63 |ume 1 of| Chernic|
|00004c20| 6f 66 66 27 73 20 5c 69 | 74 69 74 7b 4d 61 63 69 |off's \i|tit{Maci|
|00004c30| 6e 74 6f 73 68 0a 52 65 | 76 65 61 6c 65 64 2c 7d |ntosh.Re|vealed,}|
|00004c40| 20 61 6e 64 20 70 61 67 | 65 20 49 2d 34 37 34 20 | and pag|e I-474 |
|00004c50| 6f 66 20 5c 69 74 69 74 | 7b 49 6e 73 69 64 65 20 |of \itit|{Inside |
|00004c60| 4d 61 63 69 6e 74 6f 73 | 68 2e 7d 20 20 0a 50 61 |Macintos|h.} .Pa|
|00004c70| 74 74 65 72 6e 73 20 34 | 30 20 74 68 72 6f 75 67 |tterns 4|0 throug|
|00004c80| 68 20 31 30 34 20 61 72 | 65 20 67 72 65 79 73 63 |h 104 ar|e greysc|
|00004c90| 61 6c 65 20 70 61 74 74 | 65 72 6e 73 20 69 6e 63 |ale patt|erns inc|
|00004ca0| 72 65 61 73 69 6e 67 20 | 67 72 61 64 75 61 6c 6c |reasing |graduall|
|00004cb0| 79 0a 69 6e 20 69 6e 74 | 65 6e 73 69 74 79 20 66 |y.in int|ensity f|
|00004cc0| 72 6f 6d 20 61 6c 6c 20 | 62 61 63 6b 67 72 6f 75 |rom all |backgrou|
|00004cd0| 6e 64 20 28 34 30 29 20 | 74 6f 20 61 6c 6c 20 66 |nd (40) |to all f|
|00004ce0| 6f 72 65 67 72 6f 75 6e | 64 20 28 31 30 34 29 2e |oregroun|d (104).|
|00004cf0| 20 20 0a 5c 69 66 58 31 | 31 7b 41 6c 6c 20 6f 74 | .\ifX1|1{All ot|
|00004d00| 68 65 72 20 65 6e 74 72 | 69 65 73 20 69 6e 20 74 |her entr|ies in t|
|00004d10| 68 65 20 62 69 74 6d 61 | 70 20 70 61 74 74 65 72 |he bitma|p patter|
|00004d20| 6e 20 74 61 62 6c 65 20 | 61 72 65 20 75 6e 64 65 |n table |are unde|
|00004d30| 66 69 6e 65 64 3b 20 75 | 73 65 20 6f 66 20 61 6e |fined; u|se of an|
|00004d40| 0a 75 6e 64 65 66 69 6e | 65 64 20 70 61 74 74 65 |.undefin|ed patte|
|00004d50| 72 6e 20 69 73 20 61 20 | 66 61 74 61 6c 20 65 72 |rn is a |fatal er|
|00004d60| 72 6f 72 2e 7d 0a 5c 69 | 66 4d 61 63 7b 41 6c 6c |ror.}.\i|fMac{All|
|00004d70| 20 6f 74 68 65 72 20 65 | 6e 74 72 69 65 73 20 69 | other e|ntries i|
|00004d80| 6e 20 74 68 65 20 62 69 | 74 6d 61 70 20 70 61 74 |n the bi|tmap pat|
|00004d90| 74 65 72 6e 20 74 61 62 | 6c 65 20 68 61 76 65 20 |tern tab|le have |
|00004da0| 72 61 6e 64 6f 6d 20 70 | 61 74 74 65 72 6e 73 0a |random p|atterns.|
|00004db0| 69 6e 69 74 69 61 6c 6c | 79 2e 7d 20 54 6f 20 73 |initiall|y.} To s|
|00004dc0| 65 65 20 61 6e 20 61 72 | 72 61 79 20 6f 66 20 74 |ee an ar|ray of t|
|00004dd0| 69 6c 65 73 20 73 68 6f | 77 69 6e 67 20 74 68 65 |iles sho|wing the|
|00004de0| 20 64 65 66 61 75 6c 74 | 20 62 69 74 6d 61 70 20 | default| bitmap |
|00004df0| 70 61 74 74 65 72 6e 20 | 74 61 62 6c 65 2c 0a 72 |pattern |table,.r|
|00004e00| 75 6e 20 74 68 65 20 65 | 78 61 6d 70 6c 65 20 70 |un the e|xample p|
|00004e10| 72 6f 67 72 61 6d 0a 5c | 74 74 69 74 7b 73 68 6f |rogram.\|ttit{sho|
|00004e20| 77 5c 5f 70 61 74 74 65 | 72 6e 73 7d 2e 0a 0a 5c |w\_patte|rns}...\|
|00004e30| 6e 65 77 70 61 72 0a 4f | 6e 6c 79 20 65 6e 74 72 |newpar.O|nly entr|
|00004e40| 79 20 30 20 69 6e 20 74 | 68 65 20 70 69 78 6d 61 |y 0 in t|he pixma|
|00004e50| 70 20 70 61 74 74 65 72 | 6e 20 74 61 62 6c 65 20 |p patter|n table |
|00004e60| 69 73 20 64 65 66 69 6e | 65 64 2c 20 61 6e 64 20 |is defin|ed, and |
|00004e70| 69 74 20 69 73 20 73 69 | 6d 70 6c 79 20 61 6e 0a |it is si|mply an.|
|00004e80| 61 6c 6c 2d 63 6f 6c 6f | 72 2d 30 20 70 61 74 74 |all-colo|r-0 patt|
|00004e90| 65 72 6e 2e 0a 0a 5c 6e | 65 77 70 61 72 0a 53 52 |ern...\n|ewpar.SR|
|00004ea0| 47 50 20 70 72 6f 76 69 | 64 65 73 20 74 77 6f 20 |GP provi|des two |
|00004eb0| 6d 65 74 68 6f 64 73 20 | 66 6f 72 20 63 68 61 6e |methods |for chan|
|00004ec0| 67 69 6e 67 20 65 6e 74 | 72 69 65 73 20 69 6e 20 |ging ent|ries in |
|00004ed0| 74 68 65 20 70 61 74 74 | 65 72 6e 20 74 61 62 6c |the patt|ern tabl|
|00004ee0| 65 3a 0a 5c 62 75 6c 6c | 69 74 65 6d 20 59 6f 75 |e:.\bull|item You|
|00004ef0| 20 63 61 6e 20 68 61 76 | 65 20 53 52 47 50 20 6c | can hav|e SRGP l|
|00004f00| 6f 61 64 20 6f 6e 65 20 | 6f 72 20 6d 6f 72 65 20 |oad one |or more |
|00004f10| 70 61 74 74 65 72 6e 73 | 20 66 72 6f 6d 20 61 20 |patterns| from a |
|00004f20| 66 69 6c 65 20 77 68 69 | 63 68 20 73 74 6f 72 65 |file whi|ch store|
|00004f30| 73 0a 41 53 43 49 49 2d | 74 65 78 74 20 70 61 74 |s.ASCII-|text pat|
|00004f40| 74 65 72 6e 20 73 70 65 | 63 69 66 69 63 61 74 69 |tern spe|cificati|
|00004f50| 6f 6e 73 20 79 6f 75 20 | 63 61 6e 20 63 72 65 61 |ons you |can crea|
|00004f60| 74 65 20 75 73 69 6e 67 | 20 61 20 74 65 78 74 20 |te using| a text |
|00004f70| 65 64 69 74 6f 72 20 6f | 72 0a 63 6f 6e 76 65 6e |editor o|r.conven|
|00004f80| 69 65 6e 74 20 62 69 74 | 6d 61 70 2d 65 64 69 74 |ient bit|map-edit|
|00004f90| 6f 72 20 70 72 6f 67 72 | 61 6d 73 20 28 69 66 20 |or progr|ams (if |
|00004fa0| 61 76 61 69 6c 61 62 6c | 65 29 2e 0a 5c 62 75 6c |availabl|e)..\bul|
|00004fb0| 6c 69 74 65 6d 20 59 6f | 75 20 63 61 6e 20 67 69 |litem Yo|u can gi|
|00004fc0| 76 65 20 53 52 47 50 20 | 61 20 70 61 74 74 65 72 |ve SRGP |a patter|
|00004fd0| 6e 20 73 70 65 63 69 66 | 69 63 61 74 69 6f 6e 20 |n specif|ication |
|00004fe0| 69 6e 20 74 68 65 20 66 | 6f 72 6d 20 6f 66 20 61 |in the f|orm of a|
|00004ff0| 6e 20 61 72 72 61 79 20 | 6f 66 0a 6e 75 6d 62 65 |n array |of.numbe|
|00005000| 72 73 2e 0a 0a 5c 6e 65 | 77 70 61 72 0a 54 6f 20 |rs...\ne|wpar.To |
|00005010| 6c 6f 61 64 20 61 20 62 | 69 74 6d 61 70 20 70 61 |load a b|itmap pa|
|00005020| 74 74 65 72 6e 20 66 72 | 6f 6d 20 61 20 66 69 6c |ttern fr|om a fil|
|00005030| 65 2c 20 6f 70 65 6e 20 | 74 68 65 20 66 69 6c 65 |e, open |the file|
|00005040| 20 61 6e 64 20 70 61 73 | 73 20 74 68 65 20 73 74 | and pas|s the st|
|00005050| 72 65 61 6d 20 74 6f 20 | 74 68 65 20 66 75 6e 63 |ream to |the func|
|00005060| 74 69 6f 6e 3a 0a 0a 5c | 62 65 67 69 6e 63 6f 64 |tion:..\|begincod|
|00005070| 65 0a 69 6e 74 20 53 52 | 47 50 5f 6c 6f 61 64 42 |e.int SR|GP_loadB|
|00005080| 69 74 6d 61 70 50 61 74 | 74 65 72 6e 73 46 72 6f |itmapPat|ternsFro|
|00005090| 6d 46 69 6c 65 20 28 46 | 49 4c 45 20 2a 73 74 72 |mFile (F|ILE *str|
|000050a0| 65 61 6d 29 3b 0a 5c 65 | 6e 64 63 6f 64 65 0a 0a |eam);.\e|ndcode..|
|000050b0| 5c 6e 65 77 70 61 72 0a | 54 68 65 20 69 6e 70 75 |\newpar.|The inpu|
|000050c0| 74 20 6d 61 79 20 62 65 | 20 63 6f 6d 70 6f 73 65 |t may be| compose|
|000050d0| 64 20 6f 66 20 6f 6e 65 | 20 6f 72 20 6d 6f 72 65 |d of one| or more|
|000050e0| 20 70 61 74 74 65 72 6e | 20 73 70 65 63 69 66 69 | pattern| specifi|
|000050f0| 63 61 74 69 6f 6e 73 20 | 28 60 60 73 70 65 63 73 |cations |(``specs|
|00005100| 27 27 29 2e 0a 45 61 63 | 68 20 73 70 65 63 20 6d |'')..Eac|h spec m|
|00005110| 75 73 74 20 6f 63 63 75 | 70 79 20 65 78 61 63 74 |ust occu|py exact|
|00005120| 6c 79 20 74 77 6f 20 6c | 69 6e 65 73 20 61 6e 64 |ly two l|ines and|
|00005130| 20 6d 75 73 74 20 6d 61 | 74 63 68 20 74 68 69 73 | must ma|tch this|
|00005140| 20 66 6f 72 6d 61 74 3a | 0a 0a 5c 62 65 67 69 6e | format:|..\begin|
|00005150| 74 69 6e 79 63 6f 64 65 | 0a 73 74 61 74 69 63 20 |tinycode|.static |
|00005160| 63 68 61 72 20 62 69 74 | 70 61 74 5f 58 79 5b 5d |char bit|pat_Xy[]|
|00005170| 20 3d 20 5c 6c 62 0a 20 | 20 20 30 78 3f 3f 2c 20 | = \lb. | 0x??, |
|00005180| 30 78 3f 3f 2c 20 30 78 | 3f 3f 2c 20 30 78 3f 3f |0x??, 0x|??, 0x??|
|00005190| 2c 20 30 78 3f 3f 2c 20 | 30 78 3f 3f 2c 20 30 78 |, 0x??, |0x??, 0x|
|000051a0| 3f 3f 2c 20 30 78 3f 3f | 5c 72 62 3b 0a 5c 65 6e |??, 0x??|\rb;.\en|
|000051b0| 64 63 6f 64 65 0a 0a 5c | 6e 6f 69 6e 64 65 6e 74 |dcode..\|noindent|
|000051c0| 0a 77 68 65 72 65 20 5c | 74 74 69 74 7b 58 7d 20 |.where \|ttit{X} |
|000051d0| 69 73 20 61 20 6e 6f 6e | 2d 6e 65 67 61 74 69 76 |is a non|-negativ|
|000051e0| 65 20 69 6e 74 65 67 65 | 72 20 73 70 65 63 69 66 |e intege|r specif|
|000051f0| 79 69 6e 67 20 74 68 65 | 20 69 6e 64 65 78 20 6f |ying the| index o|
|00005200| 66 20 74 68 65 20 65 6e | 74 72 79 20 74 6f 0a 62 |f the en|try to.b|
|00005210| 65 20 73 65 74 2c 20 5c | 74 74 69 74 7b 79 7d 20 |e set, \|ttit{y} |
|00005220| 69 73 20 61 6e 79 20 61 | 72 62 69 74 72 61 72 79 |is any a|rbitrary|
|00005230| 20 67 61 72 62 61 67 65 | 20 62 65 74 77 65 65 6e | garbage| between|
|00005240| 20 74 68 65 20 69 6e 74 | 65 67 65 72 20 61 6e 64 | the int|eger and|
|00005250| 20 74 68 65 20 6c 65 66 | 74 0a 73 71 75 61 72 65 | the lef|t.square|
|00005260| 2d 62 72 61 63 65 2c 20 | 61 6e 64 20 5c 74 74 69 |-brace, |and \tti|
|00005270| 74 7b 30 78 3f 3f 7d 20 | 69 73 20 61 6e 79 20 61 |t{0x??} |is any a|
|00005280| 72 62 69 74 72 61 72 79 | 20 62 79 74 65 20 76 61 |rbitrary| byte va|
|00005290| 6c 75 65 20 72 65 70 72 | 65 73 65 6e 74 65 64 20 |lue repr|esented |
|000052a0| 69 6e 0a 68 65 78 61 64 | 65 63 69 6d 61 6c 2e 0a |in.hexad|ecimal..|
|000052b0| 5c 69 66 58 31 31 7b 54 | 68 69 73 20 73 70 65 63 |\ifX11{T|his spec|
|000052c0| 69 66 69 63 61 74 69 6f | 6e 20 66 6f 72 6d 61 74 |ificatio|n format|
|000052d0| 20 69 73 20 63 72 65 61 | 74 65 64 0a 61 75 74 6f | is crea|ted.auto|
|000052e0| 6d 61 74 69 63 61 6c 6c | 79 20 62 79 20 58 27 73 |maticall|y by X's|
|000052f0| 20 62 69 74 6d 61 70 20 | 65 64 69 74 6f 72 20 5c | bitmap |editor \|
|00005300| 69 74 69 74 7b 62 69 74 | 6d 61 70 7d 2e 7d 0a 0a |itit{bit|map}.}..|
|00005310| 5c 6e 65 77 70 61 72 0a | 41 73 20 61 20 63 6f 6e |\newpar.|As a con|
|00005320| 76 65 6e 69 65 6e 63 65 | 2c 20 61 6e 79 20 6c 69 |venience|, any li|
|00005330| 6e 65 73 20 62 65 67 69 | 6e 6e 69 6e 67 20 77 69 |nes begi|nning wi|
|00005340| 74 68 20 5c 63 6d 64 7b | 5c 23 7d 20 61 72 65 20 |th \cmd{|\#} are |
|00005350| 69 67 6e 6f 72 65 64 2c | 20 62 75 74 20 74 68 65 |ignored,| but the|
|00005360| 73 65 0a 63 6f 6d 6d 65 | 6e 74 20 6c 69 6e 65 73 |se.comme|nt lines|
|00005370| 20 6d 75 73 74 20 6e 6f | 74 20 69 6e 74 65 72 72 | must no|t interr|
|00005380| 75 70 74 20 61 20 73 69 | 6e 67 6c 65 20 74 77 6f |upt a si|ngle two|
|00005390| 2d 6c 69 6e 65 20 73 70 | 65 63 20 73 65 71 75 65 |-line sp|ec seque|
|000053a0| 6e 63 65 2e 20 20 42 6c | 61 6e 6b 20 75 6e 75 73 |nce. Bl|ank unus|
|000053b0| 65 64 0a 6c 69 6e 65 73 | 20 61 72 65 20 6e 6f 74 |ed.lines| are not|
|000053c0| 20 61 6c 6c 6f 77 65 64 | 20 61 6e 79 77 68 65 72 | allowed| anywher|
|000053d0| 65 20 69 6e 20 74 68 65 | 20 66 69 6c 65 2e 0a 0a |e in the| file...|
|000053e0| 5c 6e 65 77 70 61 72 0a | 54 68 65 20 63 6c 6f 73 |\newpar.|The clos|
|000053f0| 69 6e 67 20 6f 66 20 74 | 68 65 20 69 6e 70 75 74 |ing of t|he input|
|00005400| 20 73 74 72 65 61 6d 20 | 6d 75 73 74 20 62 65 20 | stream |must be |
|00005410| 70 65 72 66 6f 72 6d 65 | 64 20 62 79 20 74 68 65 |performe|d by the|
|00005420| 20 63 61 6c 6c 65 72 2e | 0a 54 68 69 73 20 66 75 | caller.|.This fu|
|00005430| 6e 63 74 69 6f 6e 20 72 | 65 74 75 72 6e 73 20 31 |nction r|eturns 1|
|00005440| 20 69 66 20 61 6e 79 20 | 70 72 6f 62 6c 65 6d 73 | if any |problems|
|00005450| 20 61 74 20 61 6c 6c 20 | 6f 63 63 75 72 72 65 64 | at all |occurred|
|00005460| 3b 20 73 69 6e 63 65 20 | 69 74 73 20 70 61 72 73 |; since |its pars|
|00005470| 65 72 20 6d 61 6b 65 73 | 0a 6e 6f 20 61 74 74 65 |er makes|.no atte|
|00005480| 6d 70 74 20 61 74 20 65 | 72 72 6f 72 20 72 65 63 |mpt at e|rror rec|
|00005490| 6f 76 65 72 79 2c 20 69 | 74 20 69 73 20 77 69 73 |overy, i|t is wis|
|000054a0| 65 20 74 6f 20 63 68 65 | 63 6b 20 74 68 65 20 72 |e to che|ck the r|
|000054b0| 65 74 75 72 6e 20 76 61 | 6c 75 65 2e 0a 0a 0a 0a |eturn va|lue.....|
|000054c0| 5c 6e 65 77 70 61 72 0a | 54 6f 20 6c 6f 61 64 20 |\newpar.|To load |
|000054d0| 61 20 70 69 78 6d 61 70 | 20 70 61 74 74 65 72 6e |a pixmap| pattern|
|000054e0| 20 66 72 6f 6d 20 61 20 | 66 69 6c 65 2c 20 75 73 | from a |file, us|
|000054f0| 65 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 20 77 |e this r|outine w|
|00005500| 68 6f 73 65 20 66 75 6e | 63 74 69 6f 6e 61 6c 69 |hose fun|ctionali|
|00005510| 74 79 0a 69 73 20 73 69 | 6d 69 6c 61 72 20 74 6f |ty.is si|milar to|
|00005520| 20 74 68 61 74 20 6f 66 | 20 74 68 65 20 6f 6e 65 | that of| the one|
|00005530| 20 66 6f 72 20 62 69 74 | 6d 61 70 20 70 61 74 74 | for bit|map patt|
|00005540| 65 72 6e 73 3a 0a 0a 5c | 62 65 67 69 6e 63 6f 64 |erns:..\|begincod|
|00005550| 65 0a 69 6e 74 20 53 52 | 47 50 5f 6c 6f 61 64 50 |e.int SR|GP_loadP|
|00005560| 69 78 6d 61 70 50 61 74 | 74 65 72 6e 73 46 72 6f |ixmapPat|ternsFro|
|00005570| 6d 46 69 6c 65 20 28 46 | 49 4c 45 20 2a 73 74 72 |mFile (F|ILE *str|
|00005580| 65 61 6d 29 3b 0a 5c 65 | 6e 64 63 6f 64 65 0a 0a |eam);.\e|ndcode..|
|00005590| 5c 6e 65 77 70 61 72 0a | 5c 69 66 4d 61 63 7b 5c |\newpar.|\ifMac{\|
|000055a0| 62 6f 6c 64 69 74 7b 57 | 61 72 6e 69 6e 67 3a 20 |boldit{W|arning: |
|000055b0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 4d 61 63 | the cur|rent Mac|
|000055c0| 69 6e 74 6f 73 68 20 76 | 65 72 73 69 6f 6e 20 64 |intosh v|ersion d|
|000055d0| 6f 65 73 20 6e 6f 74 20 | 73 75 70 70 6f 72 74 20 |oes not |support |
|000055e0| 74 68 69 73 2e 7d 7d 0a | 54 68 65 20 69 6e 70 75 |this.}}.|The inpu|
|000055f0| 74 20 6d 61 79 20 62 65 | 20 63 6f 6d 70 6f 73 65 |t may be| compose|
|00005600| 64 20 6f 66 20 6f 6e 65 | 20 6f 72 20 6d 6f 72 65 |d of one| or more|
|00005610| 20 70 61 74 74 65 72 6e | 20 73 70 65 63 69 66 69 | pattern| specifi|
|00005620| 63 61 74 69 6f 6e 73 2c | 20 65 61 63 68 20 6d 61 |cations,| each ma|
|00005630| 74 63 68 69 6e 67 0a 74 | 68 69 73 20 66 6f 72 6d |tching.t|his form|
|00005640| 61 74 3a 0a 0a 5c 62 65 | 67 69 6e 74 69 6e 79 63 |at:..\be|gintinyc|
|00005650| 6f 64 65 0a 73 74 61 74 | 69 63 20 69 6e 74 20 70 |ode.stat|ic int p|
|00005660| 69 78 70 61 74 5f 58 79 | 5b 5d 20 3d 20 5c 6c 62 |ixpat_Xy|[] = \lb|
|00005670| 0a 20 20 20 3f 2c 20 3f | 2c 20 3f 2c 20 3f 2c 20 |. ?, ?|, ?, ?, |
|00005680| 3f 2c 20 3f 2c 20 3f 2c | 20 3f 2c 0a 20 20 20 3f |?, ?, ?,| ?,. ?|
|00005690| 2c 20 3f 2c 20 3f 2c 20 | 3f 2c 20 3f 2c 20 3f 2c |, ?, ?, |?, ?, ?,|
|000056a0| 20 3f 2c 20 3f 2c 0a 20 | 20 20 3f 2c 20 3f 2c 20 | ?, ?,. | ?, ?, |
|000056b0| 3f 2c 20 3f 2c 20 3f 2c | 20 3f 2c 20 3f 2c 20 3f |?, ?, ?,| ?, ?, ?|
|000056c0| 2c 0a 20 20 20 3f 2c 20 | 3f 2c 20 3f 2c 20 3f 2c |,. ?, |?, ?, ?,|
|000056d0| 20 3f 2c 20 3f 2c 20 3f | 2c 20 3f 2c 0a 20 20 20 | ?, ?, ?|, ?,. |
|000056e0| 3f 2c 20 3f 2c 20 3f 2c | 20 3f 2c 20 3f 2c 20 3f |?, ?, ?,| ?, ?, ?|
|000056f0| 2c 20 3f 2c 20 3f 2c 0a | 20 20 20 3f 2c 20 3f 2c |, ?, ?,.| ?, ?,|
|00005700| 20 3f 2c 20 3f 2c 20 3f | 2c 20 3f 2c 20 3f 2c 20 | ?, ?, ?|, ?, ?, |
|00005710| 3f 2c 0a 20 20 20 3f 2c | 20 3f 2c 20 3f 2c 20 3f |?,. ?,| ?, ?, ?|
|00005720| 2c 20 3f 2c 20 3f 2c 20 | 3f 2c 20 3f 2c 0a 20 20 |, ?, ?, |?, ?,. |
|00005730| 20 3f 2c 20 3f 2c 20 3f | 2c 20 3f 2c 20 3f 2c 20 | ?, ?, ?|, ?, ?, |
|00005740| 3f 2c 20 3f 2c 20 3f 5c | 72 62 3b 0a 5c 65 6e 64 |?, ?, ?\|rb;.\end|
|00005750| 63 6f 64 65 0a 0a 5c 6e | 6f 69 6e 64 65 6e 74 0a |code..\n|oindent.|
|00005760| 49 6e 20 74 68 69 73 20 | 73 70 65 63 69 66 69 63 |In this |specific|
|00005770| 61 74 69 6f 6e 2c 20 65 | 61 63 68 20 5c 74 74 69 |ation, e|ach \tti|
|00005780| 74 7b 3f 7d 20 72 65 70 | 72 65 73 65 6e 74 73 20 |t{?} rep|resents |
|00005790| 61 20 64 65 63 69 6d 61 | 6c 20 69 6e 74 65 67 65 |a decima|l intege|
|000057a0| 72 20 63 6f 6c 6f 72 20 | 69 6e 64 65 78 2e 0a 0a |r color |index...|
|000057b0| 5c 6e 65 77 70 61 72 0a | 41 70 70 6c 69 63 61 74 |\newpar.|Applicat|
|000057c0| 69 6f 6e 73 20 67 65 6e | 65 72 61 74 69 6e 67 20 |ions gen|erating |
|000057d0| 74 68 65 20 70 61 74 74 | 65 72 6e 73 20 61 74 20 |the patt|erns at |
|000057e0| 72 75 6e 74 69 6d 65 20 | 63 61 6e 20 75 73 65 20 |runtime |can use |
|000057f0| 74 68 65 73 65 20 72 6f | 75 74 69 6e 65 73 20 74 |these ro|utines t|
|00005800| 6f 20 73 65 74 0a 6f 6e | 65 20 65 6e 74 72 79 20 |o set.on|e entry |
|00005810| 61 74 20 61 20 74 69 6d | 65 3a 0a 0a 5c 6e 65 77 |at a tim|e:..\new|
|00005820| 73 79 6e 6f 70 73 69 73 | 0a 76 6f 69 64 20 53 52 |synopsis|.void SR|
|00005830| 47 50 5f 6c 6f 61 64 42 | 69 74 6d 61 70 50 61 74 |GP_loadB|itmapPat|
|00005840| 74 65 72 6e 20 28 69 6e | 74 20 70 61 74 74 65 72 |tern (in|t patter|
|00005850| 6e 5f 69 64 2c 20 63 68 | 61 72 20 2a 64 61 74 61 |n_id, ch|ar *data|
|00005860| 29 3b 0a 76 6f 69 64 20 | 53 52 47 50 5f 6c 6f 61 |);.void |SRGP_loa|
|00005870| 64 50 69 78 6d 61 70 50 | 61 74 74 65 72 6e 20 28 |dPixmapP|attern (|
|00005880| 69 6e 74 20 70 61 74 74 | 65 72 6e 5f 69 64 2c 20 |int patt|ern_id, |
|00005890| 69 6e 74 20 2a 64 61 74 | 61 29 3b 0a 5c 65 6e 64 |int *dat|a);.\end|
|000058a0| 73 79 6e 6f 70 73 69 73 | 0a 54 68 65 20 66 6f 72 |synopsis|.The for|
|000058b0| 6d 65 72 20 72 6f 75 74 | 69 6e 65 20 65 78 70 65 |mer rout|ine expe|
|000058c0| 63 74 73 20 61 6e 20 61 | 72 72 61 79 20 6f 66 20 |cts an a|rray of |
|000058d0| 38 20 63 68 61 72 61 63 | 74 65 72 73 3b 20 74 68 |8 charac|ters; th|
|000058e0| 65 20 6c 61 74 74 65 72 | 20 61 6e 20 61 72 72 61 |e latter| an arra|
|000058f0| 79 20 6f 66 20 36 34 0a | 69 6e 74 65 67 65 72 73 |y of 64.|integers|
|00005900| 2e 20 20 5c 69 66 4d 61 | 63 7b 5c 62 6f 6c 64 69 |. \ifMa|c{\boldi|
|00005910| 74 7b 57 61 72 6e 69 6e | 67 3a 20 74 68 65 20 63 |t{Warnin|g: the c|
|00005920| 75 72 72 65 6e 74 20 4d | 61 63 69 6e 74 6f 73 68 |urrent M|acintosh|
|00005930| 20 76 65 72 73 69 6f 6e | 20 64 6f 65 73 20 6e 6f | version| does no|
|00005940| 74 0a 73 75 70 70 6f 72 | 74 20 74 68 65 20 6c 6f |t.suppor|t the lo|
|00005950| 61 64 69 6e 67 20 6f 66 | 20 70 69 78 6d 61 70 20 |ading of| pixmap |
|00005960| 70 61 74 74 65 72 6e 73 | 2e 7d 7d 0a 0a 5c 6e 65 |patterns|.}}..\ne|
|00005970| 77 70 61 72 0a 41 6e 6f | 74 68 65 72 20 61 74 74 |wpar.Ano|ther att|
|00005980| 72 69 62 75 74 65 20 69 | 73 20 74 68 65 20 66 6f |ribute i|s the fo|
|00005990| 6e 74 20 74 6f 20 62 65 | 20 75 73 65 64 20 66 6f |nt to be| used fo|
|000059a0| 72 20 74 65 78 74 2e 20 | 20 53 52 47 50 20 70 72 |r text. | SRGP pr|
|000059b0| 6f 76 69 64 65 73 20 61 | 20 74 61 62 6c 65 20 6f |ovides a| table o|
|000059c0| 66 0a 66 6f 6e 74 73 20 | 74 68 61 74 20 6d 61 79 |f.fonts |that may|
|000059d0| 20 62 65 20 75 73 65 64 | 20 61 6e 64 20 6d 6f 64 | be used| and mod|
|000059e0| 69 66 69 65 64 20 62 79 | 20 74 68 65 20 61 70 70 |ified by| the app|
|000059f0| 6c 69 63 61 74 69 6f 6e | 2e 20 20 45 61 63 68 20 |lication|. Each |
|00005a00| 65 6e 74 72 79 20 69 73 | 0a 69 64 65 6e 74 69 66 |entry is|.identif|
|00005a10| 69 65 64 20 62 79 20 61 | 20 75 6e 69 71 75 65 20 |ied by a| unique |
|00005a20| 5c 69 74 69 74 7b 66 6f | 6e 74 20 69 6e 64 65 78 |\itit{fo|nt index|
|00005a30| 7d 20 28 72 61 6e 67 69 | 6e 67 20 66 72 6f 6d 20 |} (rangi|ng from |
|00005a40| 30 20 74 6f 0a 5c 74 74 | 69 74 7b 4d 41 58 5c 5f |0 to.\tt|it{MAX\_|
|00005a50| 46 4f 4e 54 5c 5f 49 4e | 44 45 58 7d 29 2e 0a 49 |FONT\_IN|DEX})..I|
|00005a60| 6e 69 74 69 61 6c 6c 79 | 2c 20 6f 6e 6c 79 20 65 |nitially|, only e|
|00005a70| 6e 74 72 79 20 5c 23 30 | 20 6f 66 20 74 68 65 20 |ntry \#0| of the |
|00005a80| 66 6f 6e 74 20 74 61 62 | 6c 65 20 69 73 20 64 65 |font tab|le is de|
|00005a90| 66 69 6e 65 64 2e 0a 54 | 68 65 20 61 70 70 6c 69 |fined..T|he appli|
|00005aa0| 63 61 74 69 6f 6e 20 63 | 61 6e 20 6d 6f 64 69 66 |cation c|an modif|
|00005ab0| 79 20 74 68 65 20 74 61 | 62 6c 65 20 76 69 61 3a |y the ta|ble via:|
|00005ac0| 0a 0a 5c 6e 65 77 73 79 | 6e 6f 70 73 69 73 0a 76 |..\newsy|nopsis.v|
|00005ad0| 6f 69 64 20 53 52 47 50 | 5f 6c 6f 61 64 46 6f 6e |oid SRGP|_loadFon|
|00005ae0| 74 20 28 69 6e 74 20 66 | 6f 6e 74 69 6e 64 65 78 |t (int f|ontindex|
|00005af0| 2c 20 63 68 61 72 20 2a | 6e 61 6d 65 29 3b 0a 5c |, char *|name);.\|
|00005b00| 65 6e 64 73 79 6e 6f 70 | 73 69 73 0a 54 68 69 73 |endsynop|sis.This|
|00005b10| 20 66 75 6e 63 74 69 6f | 6e 20 61 6c 6c 6f 77 73 | functio|n allows|
|00005b20| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00005b30| 20 74 6f 20 6c 6f 61 64 | 20 61 20 66 6f 6e 74 0a | to load| a font.|
|00005b40| 69 6e 74 6f 20 61 20 67 | 69 76 65 6e 20 65 6e 74 |into a g|iven ent|
|00005b50| 72 79 20 6f 66 20 74 68 | 65 20 74 61 62 6c 65 2e |ry of th|e table.|
|00005b60| 20 20 0a 5c 69 66 58 31 | 31 7b 54 68 65 20 6e 61 | .\ifX1|1{The na|
|00005b70| 6d 65 20 6f 66 20 74 68 | 65 20 66 6f 6e 74 20 69 |me of th|e font i|
|00005b80| 73 20 73 69 6d 70 6c 79 | 20 74 68 65 20 6e 61 6d |s simply| the nam|
|00005b90| 65 20 6f 66 20 61 20 66 | 69 6c 65 20 63 6f 6e 74 |e of a f|ile cont|
|00005ba0| 61 69 6e 69 6e 67 20 74 | 68 65 20 66 6f 6e 74 27 |aining t|he font'|
|00005bb0| 73 0a 64 65 73 63 72 69 | 70 74 69 6f 6e 2e 20 20 |s.descri|ption. |
|00005bc0| 54 68 65 20 66 69 6c 65 | 6e 61 6d 65 20 6d 75 73 |The file|name mus|
|00005bd0| 74 20 62 65 20 61 62 73 | 6f 6c 75 74 65 20 28 62 |t be abs|olute (b|
|00005be0| 65 67 69 6e 20 77 69 74 | 68 20 61 20 73 6c 61 73 |egin wit|h a slas|
|00005bf0| 68 29 20 75 6e 6c 65 73 | 73 20 74 68 65 0a 66 6f |h) unles|s the.fo|
|00005c00| 6e 74 20 6c 69 65 73 20 | 69 6e 20 74 68 65 20 64 |nt lies |in the d|
|00005c10| 65 66 61 75 6c 74 20 64 | 69 72 65 63 74 6f 72 79 |efault d|irectory|
|00005c20| 20 74 68 61 74 20 69 73 | 20 75 73 65 64 20 62 79 | that is| used by|
|00005c30| 20 58 20 69 6e 20 66 6f | 6e 74 20 73 65 61 72 63 | X in fo|nt searc|
|00005c40| 68 65 73 2e 7d 0a 5c 69 | 66 4d 61 63 7b 54 68 65 |hes.}.\i|fMac{The|
|00005c50| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 66 6f 6e | name of| the fon|
|00005c60| 74 20 6d 75 73 74 20 63 | 6f 6d 70 6c 79 20 77 69 |t must c|omply wi|
|00005c70| 74 68 20 0a 74 68 65 20 | 66 6f 72 6d 61 74 20 5c |th .the |format \|
|00005c80| 63 6d 64 7b 66 6f 6e 74 | 2e 73 69 7a 65 2e 73 74 |cmd{font|.size.st|
|00005c90| 79 6c 65 7d 0a 77 68 65 | 72 65 20 5c 69 74 69 74 |yle}.whe|re \itit|
|00005ca0| 7b 66 6f 6e 74 7d 20 69 | 73 20 74 68 65 20 6e 61 |{font} i|s the na|
|00005cb0| 6d 65 20 6f 66 20 61 20 | 4d 61 63 69 6e 74 6f 73 |me of a |Macintos|
|00005cc0| 68 20 66 6f 6e 74 20 66 | 61 6d 69 6c 79 20 28 65 |h font f|amily (e|
|00005cd0| 2e 67 2e 2c 20 60 60 43 | 68 69 63 61 67 6f 27 27 |.g., ``C|hicago''|
|00005ce0| 29 2c 0a 5c 69 74 69 74 | 7b 73 69 7a 65 7d 20 69 |),.\itit|{size} i|
|00005cf0| 73 20 61 6e 79 20 70 6f | 73 69 74 69 76 65 20 6e |s any po|sitive n|
|00005d00| 75 6d 62 65 72 20 72 65 | 70 72 65 73 65 6e 74 69 |umber re|presenti|
|00005d10| 6e 67 20 70 6f 69 6e 74 | 73 2c 20 61 6e 64 20 5c |ng point|s, and \|
|00005d20| 69 74 69 74 7b 73 74 79 | 6c 65 7d 20 69 73 20 61 |itit{sty|le} is a|
|00005d30| 0a 63 6f 6c 6c 65 63 74 | 69 6f 6e 20 6f 66 20 73 |.collect|ion of s|
|00005d40| 69 6e 67 6c 65 2d 6c 65 | 74 74 65 72 20 73 74 79 |ingle-le|tter sty|
|00005d50| 6c 65 20 63 6f 64 65 73 | 3a 20 0a 5c 74 74 69 74 |le codes|: .\ttit|
|00005d60| 7b 62 7d 20 66 6f 72 20 | 62 6f 6c 64 2c 0a 5c 74 |{b} for |bold,.\t|
|00005d70| 74 69 74 7b 69 7d 20 66 | 6f 72 20 69 74 61 6c 69 |tit{i} f|or itali|
|00005d80| 63 2c 0a 5c 74 74 69 74 | 7b 75 7d 20 66 6f 72 20 |c,.\ttit|{u} for |
|00005d90| 75 6e 64 65 72 6c 69 6e | 65 2c 0a 5c 74 74 69 74 |underlin|e,.\ttit|
|00005da0| 7b 6f 7d 20 66 6f 72 20 | 6f 75 74 6c 69 6e 65 2c |{o} for |outline,|
|00005db0| 0a 5c 74 74 69 74 7b 73 | 7d 20 66 6f 72 20 73 68 |.\ttit{s|} for sh|
|00005dc0| 61 64 6f 77 2c 0a 5c 74 | 74 69 74 7b 63 7d 20 66 |adow,.\t|tit{c} f|
|00005dd0| 6f 72 20 63 6f 6e 64 65 | 6e 73 65 2c 20 6f 72 0a |or conde|nse, or.|
|00005de0| 5c 74 74 69 74 7b 65 7d | 20 66 6f 72 20 65 78 74 |\ttit{e}| for ext|
|00005df0| 65 6e 64 2e 20 20 0a 49 | 66 20 70 6c 61 69 6e 20 |end. .I|f plain |
|00005e00| 74 65 78 74 20 69 73 20 | 64 65 73 69 72 65 64 2c |text is |desired,|
|00005e10| 20 79 6f 75 20 6d 61 79 | 20 75 73 65 20 74 68 65 | you may| use the|
|00005e20| 20 66 6f 72 6d 61 74 0a | 5c 63 6d 64 7b 66 6f 6e | format.|\cmd{fon|
|00005e30| 74 2e 73 69 7a 65 7d 20 | 77 69 74 68 20 6f 72 20 |t.size} |with or |
|00005e40| 77 69 74 68 6f 75 74 20 | 61 20 74 65 72 6d 69 6e |without |a termin|
|00005e50| 61 74 69 6e 67 20 70 65 | 72 69 6f 64 2e 7d 0a 0a |ating pe|riod.}..|
|00005e60| 0a 0a 0a 5c 6d 69 6e 6f | 72 73 65 63 74 7b 33 2e |...\mino|rsect{3.|
|00005e70| 34 7d 7b 63 6f 6e 74 72 | 6f 6c 20 6f 66 20 61 74 |4}{contr|ol of at|
|00005e80| 74 72 69 62 75 74 65 73 | 20 61 66 66 65 63 74 69 |tributes| affecti|
|00005e90| 6e 67 20 6f 75 74 70 75 | 74 7d 0a 54 68 65 73 65 |ng outpu|t}.These|
|00005ea0| 20 70 72 6f 63 65 64 75 | 72 65 73 20 61 6c 6c 6f | procedu|res allo|
|00005eb0| 77 20 63 6f 6e 74 72 6f | 6c 20 6f 66 20 74 68 65 |w contro|l of the|
|00005ec0| 20 76 61 6c 75 65 20 6f | 66 20 65 61 63 68 20 61 | value o|f each a|
|00005ed0| 74 74 72 69 62 75 74 65 | 0a 61 73 73 6f 63 69 61 |ttribute|.associa|
|00005ee0| 74 65 64 20 77 69 74 68 | 20 74 68 65 20 63 75 72 |ted with| the cur|
|00005ef0| 72 65 6e 74 6c 79 2d 61 | 63 74 69 76 65 20 63 61 |rently-a|ctive ca|
|00005f00| 6e 76 61 73 2e 0a 0a 0a | 5c 6e 65 77 73 79 6e 6f |nvas....|\newsyno|
|00005f10| 70 73 69 73 0a 74 79 70 | 65 64 65 66 20 65 6e 75 |psis.typ|edef enu|
|00005f20| 6d 20 5c 6c 62 7b 7d 57 | 52 49 54 45 5f 52 45 50 |m \lb{}W|RITE_REP|
|00005f30| 4c 41 43 45 2c 20 57 52 | 49 54 45 5f 58 4f 52 2c |LACE, WR|ITE_XOR,|
|00005f40| 20 57 52 49 54 45 5f 4f | 52 2c 20 57 52 49 54 45 | WRITE_O|R, WRITE|
|00005f50| 5f 41 4e 44 5c 72 62 20 | 77 72 69 74 65 4d 6f 64 |_AND\rb |writeMod|
|00005f60| 65 54 79 70 65 3b 0a 76 | 6f 69 64 20 53 52 47 50 |eType;.v|oid SRGP|
|00005f70| 5f 73 65 74 57 72 69 74 | 65 4d 6f 64 65 20 28 77 |_setWrit|eMode (w|
|00005f80| 72 69 74 65 4d 6f 64 65 | 54 79 70 65 29 3b 0a 5c |riteMode|Type);.\|
|00005f90| 65 6e 64 73 79 6e 6f 70 | 73 69 73 0a 54 68 65 20 |endsynop|sis.The |
|00005fa0| 77 72 69 74 65 20 6d 6f | 64 65 20 61 66 66 65 63 |write mo|de affec|
|00005fb0| 74 73 20 74 68 65 20 77 | 72 69 74 69 6e 67 20 6f |ts the w|riting o|
|00005fc0| 66 20 61 20 70 69 78 65 | 6c 2c 20 74 68 65 20 67 |f a pixe|l, the g|
|00005fd0| 65 6e 65 72 61 74 69 6f | 6e 20 6f 66 20 61 0a 70 |eneratio|n of a.p|
|00005fe0| 72 69 6d 69 74 69 76 65 | 2c 20 61 6e 64 20 74 68 |rimitive|, and th|
|00005ff0| 65 20 63 6f 70 79 69 6e | 67 20 6f 66 20 61 20 72 |e copyin|g of a r|
|00006000| 65 63 74 61 6e 67 75 6c | 61 72 20 70 6f 72 74 69 |ectangul|ar porti|
|00006010| 6f 6e 20 6f 66 20 61 20 | 63 61 6e 76 61 73 2e 20 |on of a |canvas. |
|00006020| 20 54 68 65 0a 64 65 66 | 61 75 6c 74 20 69 73 20 | The.def|ault is |
|00006030| 5c 74 74 69 74 7b 57 52 | 49 54 45 5c 5f 52 45 50 |\ttit{WR|ITE\_REP|
|00006040| 4c 41 43 45 7d 2e 20 20 | 5c 69 66 4d 61 63 7b 50 |LACE}. |\ifMac{P|
|00006050| 6c 65 61 73 65 20 73 65 | 65 20 74 68 65 20 69 6d |lease se|e the im|
|00006060| 70 6f 72 74 61 6e 74 20 | 6e 6f 74 65 0a 6f 6e 20 |portant |note.on |
|00006070| 4d 61 63 27 73 20 6c 69 | 6d 69 74 65 64 20 73 75 |Mac's li|mited su|
|00006080| 70 70 6f 72 74 20 6f 66 | 20 77 72 69 74 65 20 6d |pport of| write m|
|00006090| 6f 64 65 73 2c 20 69 6e | 20 73 65 63 74 69 6f 6e |odes, in| section|
|000060a0| 20 30 20 6f 66 20 74 68 | 69 73 20 6d 61 6e 75 61 | 0 of th|is manua|
|000060b0| 6c 2e 7d 0a 0a 0a 5c 6e | 65 78 74 73 79 6e 6f 70 |l.}...\n|extsynop|
|000060c0| 73 69 73 0a 76 6f 69 64 | 20 53 52 47 50 5f 73 65 |sis.void| SRGP_se|
|000060d0| 74 43 6c 69 70 52 65 63 | 74 61 6e 67 6c 65 20 28 |tClipRec|tangle (|
|000060e0| 72 65 63 74 61 6e 67 6c | 65 29 3b 0a 5c 65 6e 64 |rectangl|e);.\end|
|000060f0| 73 79 6e 6f 70 73 69 73 | 0a 41 6c 6c 20 73 75 62 |synopsis|.All sub|
|00006100| 73 65 71 75 65 6e 74 6c | 79 2d 63 72 65 61 74 65 |sequentl|y-create|
|00006110| 64 20 70 72 69 6d 69 74 | 69 76 65 73 20 61 6e 64 |d primit|ives and|
|00006120| 20 73 75 62 73 65 71 75 | 65 6e 74 20 70 69 78 65 | subsequ|ent pixe|
|00006130| 6c 2d 63 6f 70 79 69 6e | 67 73 20 61 72 65 20 63 |l-copyin|gs are c|
|00006140| 6c 69 70 70 65 64 0a 74 | 6f 20 74 68 65 20 73 70 |lipped.t|o the sp|
|00006150| 65 63 69 66 69 65 64 20 | 72 65 63 74 61 6e 67 6c |ecified |rectangl|
|00006160| 65 2e 20 54 68 65 20 64 | 65 66 61 75 6c 74 20 63 |e. The d|efault c|
|00006170| 6c 69 70 70 69 6e 67 20 | 72 65 63 74 61 6e 67 6c |lipping |rectangl|
|00006180| 65 20 69 73 20 65 78 61 | 63 74 6c 79 20 74 68 65 |e is exa|ctly the|
|00006190| 20 73 69 7a 65 0a 6f 66 | 20 74 68 65 20 61 73 73 | size.of| the ass|
|000061a0| 6f 63 69 61 74 65 64 20 | 63 61 6e 76 61 73 2e 20 |ociated |canvas. |
|000061b0| 20 49 74 20 69 73 20 69 | 6c 6c 65 67 61 6c 20 74 | It is i|llegal t|
|000061c0| 6f 20 73 65 74 20 74 68 | 65 20 63 6c 69 70 70 69 |o set th|e clippi|
|000061d0| 6e 67 20 72 65 63 74 61 | 6e 67 6c 65 20 74 6f 20 |ng recta|ngle to |
|000061e0| 61 0a 72 65 63 74 61 6e | 67 6c 65 20 77 68 69 63 |a.rectan|gle whic|
|000061f0| 68 20 64 6f 65 73 20 6e | 6f 74 20 6c 69 65 20 63 |h does n|ot lie c|
|00006200| 6f 6d 70 6c 65 74 65 6c | 79 20 77 69 74 68 69 6e |ompletel|y within|
|00006210| 20 74 68 65 20 62 6f 75 | 6e 64 61 72 69 65 73 20 | the bou|ndaries |
|00006220| 6f 66 20 69 74 73 20 61 | 73 73 6f 63 69 61 74 65 |of its a|ssociate|
|00006230| 64 0a 63 61 6e 76 61 73 | 2e 0a 0a 5c 6e 65 78 74 |d.canvas|...\next|
|00006240| 73 79 6e 6f 70 73 69 73 | 0a 76 6f 69 64 20 53 52 |synopsis|.void SR|
|00006250| 47 50 5f 73 65 74 46 6f | 6e 74 20 28 69 6e 74 20 |GP_setFo|nt (int |
|00006260| 66 6f 6e 74 5f 69 6e 64 | 65 78 29 3b 0a 5c 65 6e |font_ind|ex);.\en|
|00006270| 64 73 79 6e 6f 70 73 69 | 73 0a 54 68 65 20 61 70 |dsynopsi|s.The ap|
|00006280| 70 6c 69 63 61 74 69 6f | 6e 20 63 68 6f 6f 73 65 |plicatio|n choose|
|00006290| 73 20 66 72 6f 6d 20 61 | 20 66 6f 6e 74 20 62 79 |s from a| font by|
|000062a0| 20 67 69 76 69 6e 67 20 | 74 68 65 20 69 6e 64 65 | giving |the inde|
|000062b0| 78 20 28 72 61 6e 67 69 | 6e 67 20 66 72 6f 6d 20 |x (rangi|ng from |
|000062c0| 30 20 74 6f 0a 5c 74 74 | 69 74 7b 4d 41 58 5c 5f |0 to.\tt|it{MAX\_|
|000062d0| 46 4f 4e 54 5c 5f 49 4e | 44 45 58 7d 29 20 69 6e |FONT\_IN|DEX}) in|
|000062e0| 74 6f 20 74 68 65 20 66 | 6f 6e 74 20 74 61 62 6c |to the f|ont tabl|
|000062f0| 65 2e 20 20 54 68 65 20 | 64 65 66 61 75 6c 74 20 |e. The |default |
|00006300| 69 73 20 30 2c 20 74 68 | 65 20 6f 6e 6c 79 20 65 |is 0, th|e only e|
|00006310| 6e 74 72 79 0a 69 6e 20 | 74 68 65 20 66 6f 6e 74 |ntry.in |the font|
|00006320| 20 74 61 62 6c 65 20 77 | 68 69 63 68 20 69 73 20 | table w|hich is |
|00006330| 69 6e 69 74 69 61 6c 69 | 7a 65 64 20 77 68 65 6e |initiali|zed when|
|00006340| 20 53 52 47 50 20 69 73 | 20 6c 61 75 6e 63 68 65 | SRGP is| launche|
|00006350| 64 2e 0a 0a 5c 6e 65 78 | 74 73 79 6e 6f 70 73 69 |d...\nex|tsynopsi|
|00006360| 73 0a 76 6f 69 64 20 53 | 52 47 50 5f 73 65 74 4d |s.void S|RGP_setM|
|00006370| 61 72 6b 65 72 53 69 7a | 65 20 28 69 6e 74 20 77 |arkerSiz|e (int w|
|00006380| 69 64 74 68 5f 69 6e 5f | 70 69 78 65 6c 73 29 3b |idth_in_|pixels);|
|00006390| 0a 5c 65 6e 64 73 79 6e | 6f 70 73 69 73 0a 54 68 |.\endsyn|opsis.Th|
|000063a0| 69 73 20 64 65 73 63 72 | 69 62 65 73 20 74 68 65 |is descr|ibes the|
|000063b0| 20 64 69 6d 65 6e 73 69 | 6f 6e 73 20 6f 66 20 74 | dimensi|ons of t|
|000063c0| 68 65 20 69 6d 61 67 69 | 6e 61 72 79 20 73 71 75 |he imagi|nary squ|
|000063d0| 61 72 65 20 74 68 61 74 | 20 63 69 72 63 75 6d 73 |are that| circums|
|000063e0| 63 72 69 62 65 73 20 61 | 0a 6d 61 72 6b 65 72 27 |cribes a|.marker'|
|000063f0| 73 20 69 6d 61 67 65 2e | 0a 0a 5c 6e 65 78 74 73 |s image.|..\nexts|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.